Questions tagged [joomla-4.x]

For questions regarding version 4.x of the Joomla! Content Management System.

Filter by
Sorted by
Tagged with
1 vote
1 answer
42 views

What is the best way to have pages displaying articles from our custom content table in Joomla 4.1?

Related: Is it possible to make it so that authors can edit their own published articles creating a new unpublished version of them? The answer to that question is "In Joomla 4 it is, but authors ...
0 votes
1 answer
36 views

How do I create parameters in a Joomla module depending on another parameter / number?

I'm trying to create a Joomla module for typical CSS cards, but I want to make the number of cards dependent on a number input from the user. For example the user wants 5 cards so in the parameter ...
2 votes
1 answer
28 views

Custom Fields inside Articles News Module in Joomla 4

I want to show some specific Custom Fields inside the Joomla 4 Articles News (mod_articles_news) module. I used to use this code in Joomla 3 : <?php $customFields = FieldsHelper::getFields('...
1 vote
0 answers
35 views

Disable the save warning on TinyMCE editors

I've programmed a modal with a TinyMCE editor inside, where it's value is saved via ajax, but when leaving the page there's still the warning Changes you made may not be saved. Is there a function or ...
1 vote
2 answers
781 views

How to get/call Joomla 4 custom fields into module

I tried below code <?php $article_id = 2; $model = JModelLegacy::getInstance('Article', 'ContentModel'); $article = $model->getItem($article_id); JLoader::register('FieldsHelper', ...
2 votes
1 answer
88 views

Joomla 4 API Question

How to convert a custom Joomla 3 to Joomla 4, and use the Joomla 4 web services API? I have an extension I wrote for J3 and with a bit of tweaking it works just fine in J4. I want to add web services ...
1 vote
0 answers
12 views

A solution for multilingual websites having a different domain name for each language

I was looking for an easy to implement solution for multilingual websites having a different domain name for each language... for Joomla 4. In Joomla 3 there were a couple of plugins, but there is ...
1 vote
2 answers
48 views

Is it possible to exclude a plugin from Progressive and Conservative cache?

I have a plugin that works fine in that it reads a value from the params of the plugin and then based on the current date/time, replaces it with a new value in the params, however with Progressive or ...
1 vote
0 answers
32 views

I can't get $params->set() to work to transfer variable from module to template

I'm trying to get a variable from my module to my template but its not working. In my modules xml I defined: <fields name="params"> <fieldset name="basic"> &...
0 votes
0 answers
28 views

addStyleDeclaration is not working in my 4.0 module

I'm trying to insert inline css in a module and it's not working. In one of my modules php files i have the following: $document = Factory::getDocument(); // Add styles $style = 'body {' . '...
1 vote
1 answer
161 views

What is url for calling task in controller for Joomla 4?

This is my ajax query for calling a task in the controller (it works for Joomla 3 but doesn't work for Joomla 4): $.ajax({ type: "POST", url: "index.php?option=com_scrib&...
0 votes
0 answers
18 views

Change the form field name from one view to a related one

I have two related views (item and booking) in my custom component. A view for the items, and another view for booking them. So, if you browse to an item view, you will see there a "booking ...
1 vote
1 answer
100 views

Virtuemart 3.4 - products on manufacturer page

Virtuemart 3.4.2, joomla 3.8 i try copy code from category template, but cant fix this errors: at /my_template/html/com_virtuemart/manufacturer/details.php NOW I HAVE Two ERRORS: Call to a member ...
1 vote
1 answer
34 views

Joomla 4 API Issues using Joomshaper Melvin Template

It may be too specific a question, but is anyone having any issues utilizing Joomla 4 Templates and the API with extensions from Joomshaper? I have 1 site that seems to work fine, but another that is ...
0 votes
1 answer
54 views

JRequest Error to Joomla 4

I use this code on my component in Joomla 3: function add() { if(JRequest::checkToken( 'get' )) { JRequest::checkToken( 'get' ) or die( 'Invalid Token' ); } else { JRequest::...
1 vote
1 answer
57 views

Joomla 4: Problem with the contact form, the text sent is missing

I'm creating a contact form with Privacy Check box (Joomla 4, template Cassiopeia). I have done all the steps as in joomla 3.x (custom fields) and everything works. But... When the e-mail arrives, all ...
0 votes
1 answer
31 views

Unlock and Unistalling the Sample Data - Blog plugin in Joomla 4

I want to Uninstall the Sample Data - Blog plugin, but the plugin can't be remove when it's stil locked. How to unlock the Sample Data - Blog plugin in Joomla 4?
0 votes
1 answer
68 views

How to create menu item in admin menu Joomla 4 in php+mysql in module, plugin?

How to create menu item in admin menu Joomla 4 in php? From plugin/module for Joomla4?
0 votes
1 answer
42 views

Why aren't the credentials being binded in the user registration email and how can we fix it in J4?

As per the title, when an admin creates a new account with a certain email address, the new user correctly receives the email that should contain the credentials, but the values are not binded, i.e. ...
0 votes
1 answer
74 views

How to catch Joomla\CMS\Router\Exception\RouteNotFoundException in Joomla 4.1?

As per the title, how can we catch a RouteNotFoundException? For time constraints, instead of creating a custom component we opted for some hand-waving, and decided to display custom content at non-...
0 votes
0 answers
19 views

How to override Joomla 4 Editor - TinyMCE Templates into Joomla template

I did not find a way to to override Joomla 4 Editor - TinyMCE Templates into Joomla template, have anyone know how?
2 votes
1 answer
29 views

Scheduled task only running when logged in0

I built a Joomla plugin for a task and I scheduled that task to run every 5 minutes. While monitoring the task it seems it is only running when I am logged into the administrator back end if the site....
1 vote
1 answer
24 views

Customizing filters layout from joomla.searchtools.default for list view of custom component

In Joomla 4, there is the layout joomla.searchtools.default for the filters in a list view that you can see everywhere in the BackEnd. In a list view of my custom component (FrontEnd), I managed to ...
1 vote
1 answer
752 views

'JEventDispatcher' is deprecated in Joomla 4 and what is the replacement

I am using the below code in my current Joomla custom component Joomla\CMS\Plugin\PluginHelper::importPlugin('captcha'); $dispatcher = JEventDispatcher::getInstance(); $res = $dispatcher->trigger('...
0 votes
1 answer
44 views

Update system from my extension don't work

I'm not able to make my component's update system work on Joomla 4. I don't know what's missing. My manifest file: https://tabaoca.org/tabapapo-updates/updates.xml Download component: https://tabaoca....
0 votes
1 answer
80 views

Trying to write a custom form field that concatenates <input> and <select> values

I am a novice dabbler in Joomla PHP. I can build custom templates and simple frontend modules. I’m trying to write my first custom form field. I’ve gone over the documentation, reviewed several ...
0 votes
2 answers
69 views

How can I sort an unordered list alphabetically by class with JavaScript or PHP?

In a custom J4 site I am using the Shack Locations (previously Focalpoint) core extension that displays a dynamically generated legend of location types on the front end, but it is listing the nine ...
1 vote
1 answer
84 views

Security concern in Joomla .php: is define('_JEXEC', 1) safe to use?

I came across this on joomla.stackechange which has me concerned: "define('_JEXEC', 1) is a bad for security in the module. It allows people to use this file as an alternative entry point for ...
2 votes
2 answers
48 views

API - get menu items from specific menu

I can't guess how to get menu items from a specific menu via API. I use: https://github.com/alexandreelise/j4x-api-collection https://documenter.getpostman.com/view/9617873/Szzj9yJy#6ac385da-724b-4b5b-...
1 vote
1 answer
57 views

How to create a Joomla 4 Quickstart package

What are the key points of creating a Joomla 4 quickstart package? It seems that the way we used to do it for Joomla 3 does not work. We were creating a Joomla 3 quickstart following these steps: ...
1 vote
1 answer
72 views

Updated to Joomla 4 and custom PHP scripts no longer run

I have just upgraded from Joomla 3.10.8 to the latest version of Joomla 4 (it is 100% better). However some of my scripts that have run for years now no longer work. The scripts basically import files ...
0 votes
0 answers
29 views

Joomla 4 Administrator Sidebar Collapsible Menu Style in the Front End

I would like to create a Sidebar Menu style in the Front End of a Joomla 4 site that looks, feels and behaves similarly to how the current left sidebar Menu of the back end is. Including the option of ...
0 votes
1 answer
75 views

How to return data from 2 tables to one table using a select field

My tables: dzialki +--------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+---...
1 vote
1 answer
29 views

Does Showon attribute for list options work with Joomla 4?

I have tried the following exact example in the Joomla documentation: Showon attribute for list options <field name="fielda" type="list" label="FIELDA_LABEL&...
0 votes
2 answers
100 views

JRequest Method in Joomla 4

JRequest Remove from Joomla 4 then how i must use this method for example $controller->execute( JRequest::getCmd('task', $view) not work i must change it to what ?
1 vote
1 answer
19 views

How to add Toggle Inline Help button to config

Since J4.1 help text (description) is hidden in the config.xml file for my component. So how do I add the "Toggle Inline Help" button to my config view of my component? I can add this ...
0 votes
0 answers
24 views

Error when trying to sendmail An error occured while fetching the JSON data: HTTP 0 status code

On Joomla! 4.1.3 i have set the mail settings the first time i have tried with gmail SMTP and the second time with office365 smtp in both case i'am not able to send mail. When i hit the button "...
0 votes
0 answers
26 views

Joomla all versions not worked 404 pages on Litespeed server

i see front page without component, → 404 error not shows but i have its in my template.. error.php: error->getCode(); ?> - title; ?> i found very much articles, whats is maybe litespeed not support ...
0 votes
1 answer
58 views

Joomla 4: Error when I use getArticleRoute

In Joomla 4, when I use "RouteHelper::getArticleRoute", I get the next error: "Attempted to load class RouteHelper from namespace Joomla\Component\Content\Site\Helper. I want to use ...
1 vote
0 answers
36 views

Joomla exception "throw new DebugBarException("Session must be started before using stack data in the debug bar");"

I have updated my website to Joomla 4.13 and using Postman to get data via Joomla 4 webservices. I have turned on the Debug. Now I'm getting a response to the Postman "Session must be started ...
1 vote
0 answers
37 views

Getting input param from controller in Joomla 3 vs. 4

When doing this in a frontend controller: class MyControllerCustom extends BaseController { public function __construct($config = array()) { parent::__construct($config); ...
0 votes
1 answer
42 views

Is it possible to make it so that authors can edit their own published articles creating a new unpublished version of them?

Related: Is it possible to remove the "new article" button from all sections in a Joomla website? Worflows in Joomla 4 are great, but there is a feature I'm not sure they have: letting ...
1 vote
1 answer
44 views

Exception for .htacess

I'm using Joomla 4. In the configuration, URL-Rewrite is set to yes. I think that's what caused this line: Return 403 Forbidden header and show the content of the root home page RewriteRule. * Index....
3 votes
1 answer
103 views

Is the following everything one should do to prevent SQL injection?

In order to sanitize the user input in an article insertion form (title and HTML content), here are the bits that I've included: Use of JInput: $jinput = JFactory::getApplication()->input; get ...
0 votes
1 answer
19 views

URL on three-image CSS carousel not changing with images and text

I have created a rotating carousel using a Joomla 4 blog alternative menu item. The blog shows the three latest articles as 'intro items' on a rotation of 24 seconds in total, i.e. 8 seconds each. The ...
1 vote
1 answer
52 views

Is it possible to remove the "new article" button from all sections in a Joomla website?

A mate and I are doing an internship at university, and the project we are working on is a small Joomla 4.1 website. Our supervisors asked us to override the mechanics of content insertion so that an ...
2 votes
1 answer
46 views

Scheduled Tasks Infrastructure in Joomla 4.1

Is there documentation for the new Scheduled Tasks Infrastructure in Joomla 4.1 (https://github.com/joomla/joomla-cms/pull/35143)? I just created a test task for setting the site offline. I scheduled ...
0 votes
1 answer
65 views

Override a method of the Indexer class (com_finder) using a plugin

I'm trying to override a Joomla method (toggleTables in the Indexer class of the com_finder) using a plugin, but it doesn't work. Where am I going wrong? use Joomla\CMS\Plugin\CMSPlugin; use Joomla\...
1 vote
1 answer
44 views

Attempt to assign property "team" on bool

I am trying to create a model in Joomla that will display various information pertaining to a certain ID. When I create the function: public function getItem ($id = null) { if ($this->_item ===...
0 votes
0 answers
46 views

SEO-friendly URLs are being corrupted after update

I have built a directory website and started to add some content. I have created the standard pages (contact us, privacy, etc.) and added businesses. I would like SEO-friendly URLs, so I set: Search ...