Questions tagged [joomla-4.x]

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

Filter by
Sorted by
Tagged with
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 ...
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 ...
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 ...
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 ...
4
votes
1answer
431 views

Replacing JSubmenuHelper with JHtmlSidebar / Administrative menu in Joomla 4

I've been racking my brain how to add links to all the views of my component in the shiny new Joomla4 backend; I used to do it via JSubmenuHelper, but that, apparently being deprecated also before, ...
3
votes
1answer
719 views

How to use HTMLHelper to add to the document head

In this post: How to add CSS/JS/an Image to a module backend @lodder shows me how to use HTMLHelper to add CSS and JavaScript. Previously I had followed the Joomla! documentation https://docs.joomla....
3
votes
1answer
54 views

Where are plugins found in Joomla 4?

I'm working with the Joomla 4 alpha 7, and I don't see anywhere to enable / disable plugins. Are plugins not enabled yet? [edited to add alpha, not beta!]
3
votes
1answer
157 views

Menu Model Item in Joomla 4

Does anyone know how can I get the current menu model in Joomla 4? In 2.5/3.X I was using this code: $model = JModelLegacy::getInstance( 'MenusModelItem' ) ->getItem(); But this ...
3
votes
1answer
373 views

Joomla4 plugin getBody

In Joomla 3.x versions I use JResponse to get and set the body. function onAfterRender() { $content = JResponse::getBody(); ... } But in Joomla4 it returns Class 'JResponse' ...
2
votes
2answers
168 views

addScriptDeclaration is not working

I am trying to add an inline Javascript in my Joomla 4 plugin using addScriptDeclaration().I edited the code like suggested but the plugin is not working .After enabling it , it is not doing anything ....
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 ...
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()->...
2
votes
1answer
210 views

Proper way for autoloading in Joomla 4

I'm trying to make my news module modification working with Joomla 4. My module is calling custom fields and I use this autoloader below to make it work in Joomla 4. Can you tell me what is the proper ...
2
votes
1answer
418 views

Class not found in Joomla 4 when using JDate inside a function

In my last question I tried to modify mod_latest_articles module, and added myCustomFunction to ArticlesLatestHelper.php like this : /** * @package Joomla.Site * @subpackage ...
2
votes
1answer
436 views

Joomla 4 alpha mootools library

To whom it may concern: I just installed joomla 4.0 alpha and installed a custom extension of mine there in which uses mootools (JHTML::_('behavior.modal');), but it simply does not work. is there ...
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 ...
2
votes
1answer
95 views

Joomla 4.0 Text sprintf

I know at some point sprintf was a method of the JText class, but it doesn't seem to work in Joomla 4.0. I tried the following, not working: $str = Text::sprintf('...
2
votes
1answer
388 views

Joomla 4 namespacing and autoloading

I've added the namespace line to my manifest xml: <namespace>Mycompany\Component\Mycomponent</namespace> When I install the component, I'm not seeing any alias added to the libraries/...
2
votes
1answer
123 views

How to use cache calls in Joomla 4

From the documentation I use this part to store a large chunk of data if (empty($families)) { $cache = Factory::getCache(); $families = $cache->call( array( 'JFormFieldFamily', 'getFamilyList' ...
2
votes
1answer
238 views

Fatal Error: Class 'ArticlesLatestHelper' not found in Joomla 4 module while trying to add new function

I'm testing and playing with Joomla 4 alpha. What I tried to do is to quick-edit / modify the module Latest Article (mod_articles_latest), adding a new function. In joomla 3.x I usually adding a new ...
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 ...
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 #...
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 ...
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-...
2
votes
2answers
107 views

Use HTMLHelper::_ by calling a namespaced class

In my component under Joomla! 4.0, I have the following call which returns: error JHtml componentname not found. HTMLHelper::_( 'componentname.link', 'index.php?option=com_component&view=...
2
votes
1answer
130 views

Joomla 4 addfieldpath

Has the addfieldpath parameter in custom extension forms changed in Joomla 4? The Joomla admin is no longer finding my component's customized field types. I'm using addfieldpath="/administrator/...
2
votes
0answers
91 views

CLI for joomla 4 not working for me

Joomla 4 PHP 7.3.1 Composer and NPM node modules installed Following this doc on Joomladocs, CLI Update, php cli/joomla.php - and whatever command I add after doesn't work. I get an error message (...
1
vote
3answers
242 views

What is the current status of Joomla 4.x? [closed]

With the new release strategy in mind, what is the current status of Joomla 4.x? Has the development already started? Is there something on Github? Is there a google group especially for 4.x?
1
vote
2answers
113 views

Update from 3.9.x to 4.x

I want to try Joomla 4.x In the documentation for Joomla 3.x to 4.x Step by Step Migration it says: Select Joomla Next (This is the current text - it may be different in the future) from the drop-...
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
59 views

How does Joomla 4 decide a component is legacy?

What determines whether Joomla 4 treats something as a legacy component?
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 } ...
1
vote
1answer
123 views

As JSubmenuHelper is deprecated, how to migrate to JHtmlSidebar?

The only source I found about this is from this post: Replacing JSubmenuHelper with JHtmlSidebar / Administrative menu in Joomla 4 The issue here is that I tried it, and it doesn't show the Sidebar ...
1
vote
1answer
564 views

Updating JEventDispatcher triggers

Can anyone explain or point me to information on the new way to handle events in Joomla 4? I'm updating a component that uses triggers to display plugins, and it looks like this: $dispatcher = ...
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 )...
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 ...
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
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 ...
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
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-&...
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....
1
vote
1answer
69 views

Workflows in Joomla 4

As we all know Joomla 4 is on the horizon and the improvement to workflows are definitely an interesting addition. From what I've seen, the workflow works great for new content, but what about content ...
1
vote
2answers
204 views

How to set the view location in Joomla 4

I'm rebuilding a component called DogWalk for Joomla 4 and I've tried to ensure I'm doing exactly what the core Banners component does. I've named and namespaced my files, named my directories ...
1
vote
1answer
117 views

How to set a root article as subpath url for children articles

How to set a root article as sub-path URL for children articles? Meaning, I have a root page named article0, and article{1-100} under this root article. I want to display the article0 under the URL ...
1
vote
1answer
254 views

How to set up Joomla! 4 properly

I'm trying to do a pull request for Joomla! 4. I've downloaded the repro and changed branch but now I need a working copy of J4 so I can test my code. I try to install it the usual way but it the ...
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 ...
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 ...
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
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....