Questions tagged [joomla-4.x]
For questions regarding version 4.x of the Joomla! Content Management System.
425
questions
0
votes
1
answer
69
views
How to connect custom authentication plugin to openid so I can authenticate it through steam?
I need to create a "login using steam button" for a website using Joomla, from my research I can gather up that using OAuth no longer works for Steam, so I'll have to create a custom ...
0
votes
1
answer
40
views
How to use Joomla.listItemTask in Custom Component
Hi i need an example on how to implement a simple on / off toggler in a Joomla 4/5 Custom Component's list view.
I've tried the following code but i did not get any reaction in the model / idk how to ...
0
votes
1
answer
117
views
Overwrite Site Model getListQuery
I have a System Plugin to filter Joomla 4 Category Blog Articles by Custom Fields. The Plugin basically overrides the core content ArticlesModel by loading it in the onAfterRoute Event like this:
...
2
votes
1
answer
73
views
What are the hardware requirements for Joomla 4.x
My development site went down because the server was taking 7 seconds to respond. The load balancer thought it was dead. So gave 503 errors.
It makes me wonder if I need a bigger server.
What are the ...
0
votes
1
answer
35
views
Getting a Joomla 4 API component to work with language files
When programming a component for an API, the config contains the following language file definitions:
<api>
<files folder="api">
<folder>src</folder>
&...
0
votes
2
answers
42
views
ALERTS FRONTPAGE
I have alerts in frontpage that I have not been able to fix for months
https://redes.editorasalvaje.net/internet
https://redes.editorasalvaje.net/rural
https://redes.editorasalvaje.net/recursos-...
0
votes
1
answer
224
views
Call to undefined method Joomla\CMS\Application\ConsoleApplication::getTemplate()
I am converting some Joomla 3 CLI applications to use the Joomla Console and this message is causing my new CLI's to fail. There are various entries in Joomla tracker relating to similar issues where ...
0
votes
1
answer
27
views
Joomla 4: How to add a main menu item to the article?
I've encountered a problem and I can't seem to solve it.
My articles are tied to subcategories.
In one menu item, I display a list of all articles. Let's call it [all-articles]. This is Blog layout.
...
0
votes
0
answers
27
views
Short Url with FlexiContent Or Remove menu item alias from URL
I am using flexicontent for content management in Joomla 4.3.4.
And i created the Menu as
All content->Edited->News
As its URL with menu item alias
my-domain/all-content/edited/news/content-...
0
votes
0
answers
10
views
How to delete root user group?
I transferred all my users from J3! to J4! using JLex Transfer. In my J3! site I had incorrectly created usergroups as root groups. These groups are no longer necessary in my new site. All I have ...
0
votes
1
answer
19
views
New Way to use Toolbar::getInstance('toolbar')
So there is this deprecated message that pops up when using:
$toolbar = Toolbar::getInstance('toolbar');
Message:
4.0 will be removed in 6.0 Use the ToolbarFactoryInterface instead
Example: Factory::...
0
votes
0
answers
21
views
Route not working properly on J4?
I have a menu entry like so:
ID: 524
Type: Articles->Create Article
Link: index.php?option=com_content&view=form&layout=edit
In the "old days" I'do Route::_('index.php?option=...
1
vote
0
answers
23
views
Rewrite rule in htaccess in joomla 4?
In J3 i used specific rewrite rules in .htaccess that worked fine but doesn't seem to work in J4. Here's an example :
RewriteRule ^metier/([a-zA-Z0-9-_]+)\.html$ /index.php?option=com_content&view=...
0
votes
1
answer
45
views
PHP load class from namespace error
I have been using this doc to convert a client's CLi news import script from Joomla 3 to 4. The code has been stripped of all the JSON to article code for brevity.
I have gone over all of my code and ...
0
votes
1
answer
113
views
How to display category image instead of category name in article in joomla 4?
In Joomla 4, what is the code that makes me show the category image in the article?
Previously, I used this code for Joomla 3:
<?php
$secid = $this->item->catid;
$category = JCategories::...
0
votes
1
answer
113
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
1
answer
34
views
Upgrade Joomla CLi script to handle bulk import of items into articles
I am upgrading a client's CLi script that is used to automatically bulk import news items into Joomla articles. The code was originally programmed for Joomla 3 and now needs to support Joomla 4.
I ...
0
votes
1
answer
18
views
OnContentPrepare not working in custom Joomla Plugin
I have made other plugins for Joomla 4 but I am still a novice. The past two days I have been searching for a solution, it's becoming quite frustrating. I have brought back my code in the php file to ...
0
votes
2
answers
71
views
Casseiopa template - Bootstrap Carousel
I am trying to display a carousel in an article using the bootstrap code.
This is a new Joomla 4 install using the casseiopa template. Here is my code:
<div class="d-flex justify-content-...
0
votes
1
answer
15
views
Field doesn't have a default value
I have just migrated from Joomla 3 to Joomla 4 and have an issue in Ignite Gallery.
When I try to upload a new image, I receive the following error message:
Upload Error, Adjusting the uploader ...
0
votes
2
answers
358
views
Joomla4 pagination issue in component on prev, next
Facing problem in joomla pagination
when component upgraded from joomla 3 to 4
with same css, although buttons are working in joomla 4 with click taking to prev, first on left side and on right side ...
0
votes
2
answers
257
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
57
views
PHP: Need to know how to trigger onContentAfterSave on existing article
I have what I thought would be a simple challenge: to automate publishing an article and trigger the onAfterContentSave event for saving the article. This code ultimately has to run within another ...
2
votes
2
answers
168
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
449
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
14
views
add bootstrap menu instead of the default menu
I would like to make menu on mobile devices have the same behaviour as Bootstrap menu, right now the menu slides from right to left on mobile, i want to change this to toggle-open from top to bottom ...
0
votes
0
answers
4
views
How can I set Cache TTL for my font files with htacces?
My site is very good I think in pagespeed
https://www.glansbeton.be
But I have a problem with my 2 fonts
https://pagespeed.web.dev/analysis/https-www-glansbeton-be/l7cuaewka9?form_factor=mobile
The ...
1
vote
1
answer
29
views
[J4]Trying to add a user to Group with addUserToGroup()
I'm trying to use the UserHelper::addUserToGroup() to add a usergroup to a user. This is in my component when I publish one of my records, I want the owning user of that record to be added to a ...
0
votes
0
answers
26
views
Joomla 4 db prepared statement re-write
I am migrating a componenet from J3 > J4.
I am stuck with some db code (not my strongest).
Maybe there is a kind soul that could re-write this code so it works with J4 and i could onwords :-)
...
0
votes
1
answer
102
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
201
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/...
0
votes
1
answer
27
views
J4 REST API Get users how to filter?
The J4 REST API allows me to GET a full list of users, but I have not found any example of how to filter such a request, for example by searching by userID or email.
When I look at the code for the ...
3
votes
1
answer
190
views
Migrate Users from Joomla 3 to Joomla 4 with same UserIds and Passwords
So I successfully migrated users from a Joomla 3 database into a Joomla 4 database. I am hoping there is a nicer way if anyone has done it.
In particular, I couldn't work out how to create a user ...
2
votes
1
answer
93
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
31
views
Dynamic Title Module Control
I'm using PHP to creata dynamic page title based on the menu item using Sourcer and the following PHP:
<?php
$active = JFactory::getApplication()->getMenu()->getActive();
echo $active->...
0
votes
1
answer
23
views
Virtuemart 4 installation error
I installed joomla4 latest version (Joomla_4.2.6-Stable-Full_Package.zip) and I want to install VM4 (com_virtuemart.4.0.10.10767_package_or_extract.zip) and my PHP version is 8 but the following error ...
0
votes
1
answer
27
views
Tags not saving for Joomla category custom component with the correct entry in the #__content_type for the Joomla 4 and Jooma 3
Created field type category in the custom component com_drawing
but not able to save the tags in the category(refer to the image)
Table entry in the table #__content_types
INSERT INTO #...
0
votes
1
answer
47
views
J4 URL routing - cannot remove menu alias from URL - SEF issue
I've migrated a J3 site to J4 and have an issue with article URL's. In J3 an article would load /category/article i.e. https://old.lymington.com/133-locally/1458-a-guide-to-beaches-near-lymington-and-...
0
votes
0
answers
40
views
How to authenticate a user with the official Joomla 4 REST API?
I am developing a mobile app that needs to authenticate users with a Joomla 4 site. I want to use the official Joomla REST API to do this, but I couldn’t find any information about how to authenticate ...
0
votes
1
answer
39
views
How to return Http 401 on Joomla Administrator for an unauthenticated user?
everyone
How can I have /administrator/index.php?option=COM_MYCOMPONENT&controller=MYCONTROLLER&task=MYTASK return a "401 Unauthorized" HTTP error instead of redirecting to the ...
0
votes
1
answer
24
views
Create date fields with the default null value facing error incorrect date field in Joomla 4
Create a date field in the XML form
field name="nextdate" type="calendar" class="inputbox" filter="safehtml" label="COM_COMDATE_FORM_LBL_COMDATEDETAIL_NEXTDATE" description="...
0
votes
1
answer
51
views
htaccess QSA not working in Joomla 4
Migrating a Joomla 3 component to Joomla 4 I have problems with getting Apache Server htaccess correctly configured to append query string from request to substituted URL - QSA flag. - It looks like ...
0
votes
1
answer
37
views
Joomla 4 Router forward to Controller function
For a Joomla 4 component I just cannot figure out how to successfully forward or call a Controller function from within a custom Router.
This is the Controller - it basically loads an image:
<?php
...
0
votes
1
answer
53
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 ...
0
votes
1
answer
57
views
Cannot access form in Joomla 4 frontend
In Joomla 4.3.4 I have created a menu item Create Article for a specific category. When I try to create a new Article and enter the edit view, I get the following error:
0 htmlspecialchars(): Argument ...
0
votes
0
answers
17
views
Sendmail by using Joomla! settings is very slow
In my Joomla! 4.2+ component, i have something with send mail when an user submit a from, the issue is that the sending mail process is very slow. My component fetch the mail settings from the Joomla! ...
2
votes
1
answer
210
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 ...
2
votes
1
answer
49
views
Filling custom fields when creating an article with an script via the API
I am creating an article in Joomla 4 using the excellent code that is suggested here: Joomla 4 create article programmatically
My task is write the values of the custom field simultaneously with the ...
0
votes
1
answer
118
views
Custom module chrome is not working in Joomla 4
I have copied the card.php file from templates/cassiopeia/html/layouts/chromes and placed it in my templates/MYTEMPLATE/html/layouts/chromes folder, and then made some modifications to the styling. ...
0
votes
2
answers
71
views
$this->params() is Null in Joomla 4 Plugin
I have a Joomla 4 plugin that uses a ServiceProvider which basically works fine. It's just that I can't access the plugin's configuration parameters.
namespace <Domain>\Plugin\System\Replacer\...