Questions tagged [joomla-4.x]
For questions regarding version 4.x of the Joomla! Content Management System.
346
questions
1
vote
1
answer
56
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
85
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....
1
vote
1
answer
140
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&...
1
vote
1
answer
112
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
119
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 "...
1
vote
2
answers
2k
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 ?
0
votes
0
answers
58
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
464
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
39
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
98
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);
...
3
votes
1
answer
232
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
65
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
90
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 ...
1
vote
1
answer
890
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
1
answer
91
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\...
0
votes
0
answers
60
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 ...
1
vote
1
answer
60
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 ...
2
votes
0
answers
73
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 ...
1
vote
1
answer
356
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
2
answers
236
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 ...
0
votes
1
answer
90
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
0
answers
64
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'...
1
vote
0
answers
21
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 ...
1
vote
1
answer
575
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 ...
0
votes
1
answer
46
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
223
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/...
0
votes
1
answer
96
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', ...
0
votes
0
answers
260
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 ...
2
votes
1
answer
100
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\...
2
votes
1
answer
155
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 ...
1
vote
2
answers
33
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 ...
0
votes
1
answer
96
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 ...
1
vote
1
answer
78
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\...
2
votes
1
answer
96
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-...
0
votes
1
answer
130
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 ...
1
vote
1
answer
116
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
2
answers
86
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=...
2
votes
1
answer
112
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 ...
1
vote
0
answers
17
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 ...
1
vote
0
answers
25
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 ...
0
votes
1
answer
124
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 ...
0
votes
1
answer
47
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 ??
2
votes
2
answers
508
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 ...
2
votes
2
answers
424
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 ...
0
votes
0
answers
30
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/...
1
vote
1
answer
114
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/...
1
vote
0
answers
23
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 ...
2
votes
1
answer
195
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 ...
1
vote
1
answer
86
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, &...
2
votes
1
answer
65
views
How to check if site is in maintenance mode in Joomla 4?
I need to determine if the site is in maintenance mode.
Pseudo code:
if (*site is in maintenance mode*) {
// do this
} else {
// do this other thing
}