2022 Developer Survey is open! Take survey.

Questions tagged [joomla-4.x]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 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 ...
user avatar
1 vote
1 answer
24 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&...
user avatar
  • 197
1 vote
1 answer
14 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 ...
user avatar
0 votes
0 answers
21 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 "...
user avatar
0 votes
2 answers
51 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 ?
user avatar
0 votes
0 answers
25 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 ...
user avatar
0 votes
1 answer
37 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 ...
user avatar
  • 1
1 vote
0 answers
32 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 ...
user avatar
1 vote
0 answers
30 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); ...
user avatar
  • 331
3 votes
1 answer
87 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 ...
user avatar
0 votes
1 answer
35 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 ...
user avatar
1 vote
1 answer
49 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 ...
user avatar
1 vote
1 answer
33 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 ===...
user avatar
  • 37
0 votes
1 answer
63 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\...
user avatar
0 votes
0 answers
43 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 ...
user avatar
1 vote
1 answer
34 views

select onChange changed to on-change after saving Joomla 4.1 form

I have been successfully using a homemade article including a form and some javascript for a while now on Joomla 3 which also uses the Regularlabs Sourcerer plugin. Turns out that I recently migrated ...
user avatar
  • 21
2 votes
0 answers
17 views

Joomla MEMORY tables cause an error in creating/editing articles

I am encountering an error with Joomla 4 that has never occurred to me in previous installations. When I try to create/edit an article, a category or to index contents in smart search, I get the ...
user avatar
1 vote
1 answer
51 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 ...
user avatar
  • 31
0 votes
2 answers
60 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 ...
user avatar
  • 161
0 votes
1 answer
70 views

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

My tables: dzialki +--------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+---...
user avatar
1 vote
0 answers
24 views

How do I get the tag parent with Joomla 4?

I'm using Joomla 4 and need to use the new API to get tags which have a specific parent. (I am already able to do it with the legacy API using the $tag->parent_id). It seems that the new API doesn'...
user avatar
  • 131
1 vote
0 answers
11 views

Create a public controller method

I have a controller method that outputs some JSON which should be publicly accessible index.php?option=com_mycomponent&task=mycontroller.json&format=json If I set this as a System > URL ...
user avatar
  • 131
1 vote
1 answer
55 views

jQuery scripts not working in Joomla 4 template

I am trying to upgrade my Joomla 3 website to Joomla 4. One of the issues I am facing is that none of the jQuery code in my template's index.php file is working. Does jQuery not get loaded ...
user avatar
  • 141
0 votes
1 answer
18 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 ...
user avatar
  • 161
1 vote
1 answer
50 views

How to stop Joomla 4 from loading collapse.min.js in my template

I built a custom Joomla 4 template and unfortunately Joomla is automatically loading collapse.min.js When I view the page source I see this in the head: <script src="/media/vendor/bootstrap/js/...
user avatar
  • 83
0 votes
1 answer
34 views

Incorrect Uri::root() with external PHP file

The file /srv/http/components/com_mycomponent/ajax/editAction.php was initialized with https://github.com/joomla/joomla-cms/issues/34586#issuecomment-865080001, except that we use define('JPATH_BASE', ...
user avatar
0 votes
0 answers
42 views

error with joomla 4 when i try to get value from user custom Fields

with joomla v3 we use the following code to get values from database // $userfields = FieldsHelper::getFields('com_users.user', JFactory::getUser(), true); return $customFields[6]->value; // now ...
user avatar
0 votes
0 answers
25 views

How to implement and manage canonical URLs in Joomla 4.1

I want to implement and manage canonical URLs in Joomla 4.1. I know that Joomla does not provide an automatic way to generate this type of links, although they can be quite important for SEO. It is ...
user avatar
2 votes
1 answer
34 views

HTMLHelper call a custom class in a module

In the xml file for a module, I call a custom field class: <config> <fields name="params"> <fieldset name="basic" addfieldprefix="Myextension\Name\...
user avatar
2 votes
1 answer
35 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 ...
user avatar
  • 31
1 vote
2 answers
27 views

Forwarding to the item page after the creation of the item via front end editing

I wrote a small joomla 4 component and made it possible to create a new item in the frontend. After creating a new item, Joomla core components usually redirects to a list view. But I want to redirect ...
user avatar
  • 31
0 votes
1 answer
22 views

Joomla ignores css changes after URL rewrite was activated

I recently installed Joomla 4.1 on my server and since I activated URL rewriting, my changes in some CSS files of the Cassiopeia Template are ignored. I tried deactivating the URL Rewrite, but it does ...
user avatar
1 vote
1 answer
26 views

Call to undefined method Joomla\CMS\Mail\MailTemplate::ClearAddresses()

In my extensions updated for Joomla! 4.0 i use the method ClearAddresses(). In Joomla! 3.x the Joomla\CMS\Mail\Mail extended phpmailer class now in Joomla! 4.x the Joomla\CMS\Component\ComponentHelper\...
user avatar
2 votes
1 answer
47 views

Is showing a Joomla API token in JS a security risk?

I have created a couple of web services under Joomla 4 that are simple enough calls to the same website to refresh a couple of fields when something else changes. In my JS code I have the 'X-Joomla-...
user avatar
  • 2,190
0 votes
1 answer
42 views

Custom plugin doesn't even seem to load on Joomla 4

As a sort of newbie developer with php/Joomla, I created a content plugin for Joomla 3 which pretty much did what I wanted and expected... I then decided to migrate it to Joomla 4 following the very ...
user avatar
  • 21
1 vote
1 answer
53 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: ...
user avatar
  • 21
1 vote
2 answers
51 views

Folders inside src/Controller/ folder

I know that you can add a controller into the src/Controller/ folder directly, and Joomla automatically recognizes it as a controller class, and you can route to it using either ?controller=...
user avatar
2 votes
1 answer
31 views

Reducing frequency of the "Joomla! update available" mails to once per day or once per week

Is there a way to reduce the frequency of the automatic "Joomla! Update available" mails? I do not want to disable the plugin, because I want to be notified about updates. But multiple mails ...
user avatar
  • 175
1 vote
0 answers
13 views

Building J4 fails in github workflow (tarball data for joomla-a11y-checker corrupted)

Upon a few days i was building Joomla 4 in an Github Workflow and after done continued doing other stuff. Now the build process fails and i dont understand whats going wrong. Important: The build ...
user avatar
  • 71
1 vote
0 answers
13 views

Language file not loaded into extension directory

In my extension a language file which aren't loaded from the directory : /components/com_exten/language/en-GB/en-GB.com_exten.controllers.ini. In the Joomla! debug there are no parse error on this ...
user avatar
0 votes
1 answer
35 views

Decode json strings from a database table column

I have a column in my database that essentially creates an array and I am essentially trying to explode it but I cannot figure out how to get it to work. Its also going into SQL with { characters ...
user avatar
  • 37
0 votes
1 answer
27 views

Zentools compatible version

I want to use zentools. Currently im working with joomla 4.1.0 . So, I was wondering, Is there a version of zentools that is compatible with joomla 4.1.0 ??
user avatar
  • 1
2 votes
2 answers
66 views

JRoute don't make a SEF Url from the article link

When I use Route method to convert a normal url in a SEF url it doesn't work if the article is not a menu item. I don't understand if it's a normal behavior or if I'm doing something wrong. There is ...
user avatar
2 votes
2 answers
121 views

TinyMCE in Joomla 4: <custom-element> without automatically added <p>

Can someone please tell me how it becomes possible in TinyMCE that a custom HTML element e.g. <my-custom-element>text...</my-custom-element> when saving the article is NOT always forcibly ...
user avatar
0 votes
0 answers
20 views

In extensions, make the schema update SQL conditional

In the xml install file for an extension for Joomla! 4.0, there are these lines that make the SQL update : <update> <schemas> <schemapath type="mysql">sql/...
user avatar
1 vote
1 answer
62 views

Change the default articles list ordering overriding the model

I need to change the default ordering of the articles list in the administrator Articles page. To do this I probably would have to edit the populateState() method in administrator/components/...
user avatar
1 vote
0 answers
13 views

Article layout override in J!4

I'm starting to worry about updating my Joomla! 3 to Joomla! 4 (4.0.6 at the time of posting this). In Joomla!, 3 I used a lot the functionality that allows to create article layout overrides by ...
user avatar
2 votes
1 answer
45 views

Add a field (Sql or List) in article options with a search bar inside in Joomla 4

I added a field type "sql" to show a list of options in the Article Options in Joomla 4. But I need to add a field like this with a search box inside to looking for one of the voices typing ...
user avatar
0 votes
0 answers
23 views

Joomla 4 REST API - Create User with required fields

When creating a new user over api - this works fine when there are not user->fields with required fields present. However, as soon as you mark a field as required - you must include that item in ...
user avatar
1 vote
1 answer
30 views

cant display simple text onContentPrepare

I just want to display simple text and this is not working. I don't know is there a way to see something like log to see what happens in the background? public function onContentPrepare($context, &...
user avatar
  • 11