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
1answer
33 views

Invalid controller class from custom component ajax call to json method

I have an existing J3 component admin view which fires off a Javascript Ajax call to a Json controller and fetches back data which I then incorporate into that view. I'm trying to replicate how I've ...
0
votes
1answer
14 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 ...
2
votes
1answer
37 views

Creating a field plug-in, need the com_content form to be enctype multipart

I've been writing a field plug-in for adding files to articles in com_content. I've got the basics of the field plug-in working ok, extending the JFormFieldFile class The issue I've hit is, for the ...
0
votes
1answer
30 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?
1
vote
1answer
38 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....
1
vote
0answers
17 views

How to populate Frontend Article Editor with existing Article content, Joomla 4?

We are building a new site founded on Joomla 4, and would like to only use core extension like the Article features built into Joomla 4, but we've run into a wall trying to implement editing an ...
0
votes
0answers
29 views

joomla4: test the category id

I have tried if ($this->item->catid == 12){ return true; } OR with $article->catid I put the mentioned code in a module https://joomhelper.com/dbpqnex Another solution (maybe even more ...
0
votes
1answer
31 views

loadForm change behaviour from J!3.9 to J!4.0 and data not loaded with the form

In my component in a model backend, I'm loading a form but since moving the code to be used on J!4.0 the data associated to the form isn't loaded anymore. The loadForm is called: https://github.com/...
2
votes
2answers
34 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
1answer
80 views

Create a category from frontend in Joomla 4

The registered user gets the "Author" access rights. Through the menu, you can make the button "Create material" and the Author, having entered the site, can create this material. ...
1
vote
0answers
20 views

Transfer of the site, with change of the database (MySQL to MariaDB)

I built my website with Joomla4 and a MySQL8.0 database. Unfortunately, I need to transfer my site to a server using MariaDB10.4, which isn't compatible with MySQL8.0. I'm not a programmer and ...
0
votes
1answer
22 views

What would keep custom fields from rendering in the frontend on Joomla 4

When using the shortcode (example {field34}) for a field in the Article editor text area the field content is not showing on the front end. I entered the fields manually and also used the dropdown and ...
2
votes
1answer
46 views

Are custom fields updatable using joomla 4 api?

Simply put when using the API to update a custom field of an article, the new information is not successfully passed through. Furthermore, the original contents are deleted from the field. The ...
0
votes
1answer
124 views

How to Fix PHP Deprecated : Factory::getDocument() is deprecated

How can I fix the following deprecation error generated by my php code? Factory::getDocument() is deprecated $app = Factory::getApplication(); $wa = $app->getDocument()->getWebAssetManager(); ...
0
votes
1answer
34 views

Joomla 4, Error: Class '...\Component\...\Administrator\Model\SimpleXMLElement' not found

Please tell me what the problem may be. I adapt the component for Joomla 4. I get this error, although everything should work. Class '....\Component\....\Administrator\Model\SimpleXMLElement' not ...
1
vote
1answer
25 views

Call to undefined method Joomla\CMS\Application\SiteApplication::isSite() in Joomla 4

I updated to Joomla 4! and the site displays an error. Here is a snippet of the debug log. 2021-11-23T16:27:43+00:00 CRITICAL ::1 error Uncaught Throwable of type Error thrown with message &...
1
vote
1answer
51 views

J4 API - There are two variables for Article Text, why do neither work on PATCH?

While working with the new Joomla 4 web services API. The Article text does not update. Additionally, as per the documentation, when creating an article via API the article text variable is ...
0
votes
1answer
72 views

View only showing one row from sql result set

I am creating a component and trying to display a list within a model. The code I have shows the multiple arrays that should be on the list, but when I add echo inside the view table, I am only ...
1
vote
2answers
29 views

CLI function requires a Plugin with an access level of registered

I have a CLI function that runs daily and a key part of its processing uses a Plugin to create a connection with an external source to retrieve data and it works fine when the Access Level on the ...
1
vote
1answer
200 views

How to get user session info from external php script with Joomla-4.x?

How we can get the logged in user information and session information from external php script with Joomla-4.x? The below code working with Joomla 3.x and doesn't working with Joomla-4.x define( '...
1
vote
0answers
91 views

Joomla 4.0.3 - LDAP Login / Microsoft AD

Which settings and plugins are exactly needed to configure Joomla 4.0.3 with LDAP support? The AD server is a Windows Server 2016 Standard. I have activated the Joomla Plugin Authentication - LDAP ...
1
vote
0answers
45 views

Link not working after menuid being applied?

I'm writing a new extension in Joomla4. When I add an item to my menu and click on the link that is generated on the main menu, it keeps saying the page cannot be found, but if I change the number ...
1
vote
1answer
68 views

Calculate wins, losses and ties for each team in database

I have been struggling with this one for a couple days. I am trying to build a Joomla component that will display team standings based on record and then points for and points against. Currently I ...
1
vote
1answer
77 views

How to update colorpicker fields to Joomla 4.x

Older versions of Joomla were able to just use JHtml::_('behavior.colorpicker'); and then have inputs with the class minicolors minicolors-input to use a color picker. That functionality no long ...
1
vote
2answers
223 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
1answer
30 views

Joomla don't see subgroups in the Articles tab (Joomla 4)

I set up three users. To make things easier, let's take the following names: X, Y, Z. Additionally, there are subgroups in the Registered group, let's call them X_group, Y_group and Z_group. User X ...
1
vote
0answers
36 views

Migrating from Joomla 3 to Joomla 4 router alias problem

In my old router.php file at function COMPOENTParseRoute($segments), I get "404 Page not found". The error is caused by line 153 of /libraries/src/Router/Router.php. If I create the new ...
0
votes
1answer
101 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&...
1
vote
1answer
92 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 ...
0
votes
1answer
140 views

Router for Joomla 4

I cannot find any documentation on router changes for Joomla 4. Can anyone advise? It appears that placing a router.php file in the base directory for the component still works - although not in ...
4
votes
2answers
231 views

Adding ajax call in a module for Joomla 4

I'm trying to add an ajax call to Article Latest module. I added the code below to /modules/mod_articles_latest/src/Helper/ArticlesLatestHelper.php public static function getAjax() { $data ...
1
vote
0answers
23 views

Oauth2 in joomla template

**<?php /** * @package Joomla.Site * @subpackage Templates.bdcp * * @copyright Copyright (C) 2005 - 2020 All rights reserved. * @license GNU General Public License version 2 or ...
1
vote
1answer
226 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
1answer
64 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 ...
2
votes
1answer
26 views

Getting somehow the Article ID in an Alternate Layout for Custom Fields

I am creating an Alternate Layout of /components/com_fields/layouts/field/render.php to change the layout of some given Custom Fields. And there I need the ID of the article in order to give a unique #...
1
vote
1answer
58 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
1answer
285 views

Get the Article ID in J4.0

I am trying Joomla 4. My biggest problem is to migrate the get article id functionality. In Joomla 3.x, I used: defined('_JEXEC') or die; $id= JRequest::getInt('id'); but this is not longer ...
4
votes
2answers
110 views

Is Joomla4 API/Web Service ready for production use?

I've read what little I can find about J4 Web Services, but cannot find a working example or get my code to work. The code below should work by all accounts, but I get forbidden on my local machine ...
1
vote
1answer
59 views

How does Joomla 4 decide a component is legacy?

What determines whether Joomla 4 treats something as a legacy component?
1
vote
0answers
82 views

Joomla 4 - router.php SEF-URLs broken since update

This current router.php creates in Joomla 4 this URL: localhost/component/ohanah/?id=688&Itemid=101 But it should create this: localhost/kurse/688-event-name where "event-name" is the ...
1
vote
1answer
146 views

'getErrorMsg' is deprecated in Joomla 4 and what would be the equivalent

In my custom Joomla component, I got the below code $db = Joomla\CMS\Factory::getDbo(); //some code if (!$row->bind($this->_formdata)) { if($db->getErrorMsg()){ //do some code } ...
0
votes
1answer
100 views

'JModuleHelper' is deprecated in Joomla 4 and what is its equivalent

I am using the below joomla code in my custom component. $module = JModuleHelper::getModule('mod_mycustommodule'); $moduleParams = new Joomla\Registry\Registry($module->params); It seems '...
1
vote
1answer
28 views

How to properly display editor instance in Joomla 4

I'm currently updating my component to work in Joomla 4, and I've run into an issue with editors. I previously used this: $editor = JFactory::getEditor(); $editor->display('text', $this->item-&...
2
votes
1answer
70 views

Best Practice: Loading component Styles & Scripts in J4

What is the best practice for loading styles and scripts? Option 1: HTMLHelper::stylesheet(Uri::base().'media/com_mycomponent/css/mycomponent.css'); Option 2: $wa = Factory::getApplication()->...
1
vote
1answer
500 views

Get Framework and template params in Joomla 4

Joomla 4 is coming soon and i need to know how to get the joomla framework and template params in php files outside of joomla. This is the way in J3: define( '_JEXEC', 1 ); define( '_VALID_MOS', 1 )...
4
votes
4answers
2k views

JFactory::getDbo() deprecated-- what's the replacement?

I'm running Joomla 3.9.5 and I'm attempting to update my JFactory::getDbo() calls (which are deprecated) to the newer format using the container. However, I'm getting the following error: Call to ...
1
vote
1answer
272 views

Joomla4: Load a custom stylesheet (admin.css.php) in administration

I want my custom modules & custom template to fetch the parameter values (colors) from my custom template's backend. This way I can see what colors I'm picking when when I'm configuring my website....
7
votes
1answer
111 views

Joomla extension update 3.x and 4.x

I have an update server for my extensions, which targets Joomla 3.8 and 3.9 <targetplatform name="joomla" version="3.[89]"/> With the release of Joomla 3.10 and 4.0 coming ...
0
votes
1answer
46 views

Joomla 4 extension language files no longer go to 'site/languages/en-GB' when install via discovery

I'm developing a template and I find it both interesting and confusing to how Joomla 4 loads language files. First there is the templateDetails.xml notation: Cassiopeia uses <languages folder="...
1
vote
0answers
76 views

Multiple Stripe Webhooks for checkout.session.completed from various Joomla components

Scenario Site has OSMembership for subscriptions Site has RSForms Pro for registering for in person / virtual courses Site has J2Store for some miscellaneous products In Stripe, I've set up two ...