Skip to main content

Questions tagged [joomla-4.x]

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

Filter by
Sorted by
Tagged with
3 votes
1 answer
385 views

How to create an instance of the Joomla CMS from the browser or the command line

Recently there have been a number of questions posted on JSE relating to how to load the Framework that in most cases is really asking how to load up the Joomla CMS either from a command line or via a ...
Irata's user avatar
  • 3,927
1 vote
1 answer
1k views

Joomla 4 - how to set namespace for custom field addfieldprefix

I have the editors-xtd\vimeo plugin with this structure ..\plugins\editors-xtd\vimeo\models\fields\(a bunch of custom fields) ..\plugins\editors-xtd\vimeo\forms\form.xml ..\plugins\editors-xtd\vimeo\...
thednp's user avatar
  • 415
3 votes
2 answers
2k views

Joomla 4 create article programmatically

I have tried a few ways to create articles programmatically in Joomla 4, but none of my attempts are working. First is to insert data by mysql using $db->getQuery(true) -- the article shows in the ...
Na Nguyễn's user avatar
1 vote
1 answer
2k 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 )...
Marco's user avatar
  • 57
1 vote
1 answer
295 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/...
Nintendomi's user avatar
0 votes
1 answer
127 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 ...
Vincenzo Oliva's user avatar
0 votes
1 answer
37 views

Joomla 4 / 5 Module Layouts naming

When using the following field in my module xml: <field name="layout" type="modulelayout" label="...
Marco's user avatar
  • 665
8 votes
1 answer
192 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 ...
Lodder's user avatar
  • 26.9k
5 votes
1 answer
1k 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, ...
codeling's user avatar
  • 181
5 votes
4 answers
6k 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 ...
user101289's user avatar
  • 1,119
4 votes
2 answers
536 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 ...
GDP's user avatar
  • 7,715
3 votes
3 answers
2k views

Joomla 4 - Invalid controller class:display

I'm building a simple component in Joomla 4, and after reading through some tutorials I feel like I've got it right - but I'm getting this error that I can't explain in the admin view An error has ...
James's user avatar
  • 652
3 votes
1 answer
2k 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' ...
Syom's user avatar
  • 133
3 votes
1 answer
2k 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....
Eoin's user avatar
  • 1,909
3 votes
1 answer
1k 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 ...
webchun's user avatar
  • 2,418
2 votes
1 answer
468 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 ...
webchun's user avatar
  • 2,418
2 votes
1 answer
127 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 ...
Nintendomi's user avatar
2 votes
1 answer
2k 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 ...
Lovntola's user avatar
  • 344
1 vote
1 answer
61 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 ...
Vincenzo Oliva's user avatar
1 vote
1 answer
222 views

About Joomla 4 Lazy Loading feature

everyone. I've read this: https://magazine.joomla.org/all-issues/january-2021/using-native-lazyloading-on-your-website, so it's clear to me that media images inserted in articles content will be lazy-...
Alexandre Paulo's user avatar
1 vote
1 answer
546 views

Remove component's view name from url joomla 4

I am using Joomla 4.2.1. I installed custom component which is previously used into Joomla 3.10.11. I create a menu item with view from this component. On Joomla 3.10.11 it works fine for example : ...
Vishal Patel's user avatar
1 vote
1 answer
911 views

Connecting to an external database in Joomla 4

Connecting to an external database in Joomla 3 is easy following this documentation and works like a charm. But JDatabaseDriver->getInstance method is deprecated in Joomla 4. What is the ...
Peli's user avatar
  • 103
1 vote
1 answer
1k 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....
Bold's user avatar
  • 123
1 vote
1 answer
230 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 ...
JDoe's user avatar
  • 45
1 vote
1 answer
2k 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 ...
mbrampton's user avatar
  • 314
1 vote
1 answer
2k 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 ===...
Brandon's user avatar
  • 69
1 vote
1 answer
103 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 ...
Vincenzo Oliva's user avatar
1 vote
2 answers
4k 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 ?
Ali Zangeneh's user avatar
0 votes
1 answer
170 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=...
Alexandre Paulo's user avatar
0 votes
1 answer
311 views

MySQL "LOAD DATA LOCAL INFILE" with database connection object in Joomla 4

In order to import large CSV files into a Joomla database table, I use the MySQL "LOAD DATA LOCAL INFILE" command as follows: $db = $this->getDbo(); $sql = "LOAD DATA LOCAL INFILE '&...
cappu's user avatar
  • 139
0 votes
2 answers
115 views

Retrieving text from a sub-form checkboxes field [joomla 4]

I get the value checkboxes:[film_rea], but I can't get the corresponding text [realisation]. <?php foreach ($this->item->jcfields as $field) { if ('films-pros' === $field->name &&...
Hdcms's user avatar
  • 51
0 votes
1 answer
227 views

getMailer gives "Failed to start application" exception after updating to Joomla4, how do I fix it?

The issue Quoting (again) from an old question of mine: I have a form in my Joomla! site. Once completed, the form should send an e-mail but only if some conditions have been met. Not having been ...
Firefighter's user avatar
0 votes
1 answer
119 views

pass on value of id in another variable

I want to pass value of id in new variable v_id so that if we are displaying news in frontend value of v_id can be shown in front end Essentially the role which id do, can be performed by v_id Pls ...
Ruchika's user avatar
  • 415
0 votes
2 answers
70 views

Create Custom Form via SimpleXMLElement

I need to create a custom form which generates an input / text field foreach position that is stored in the database. My Code for this field so far: private function buildSubForm(array $positions) ...
Marco's user avatar
  • 665
0 votes
0 answers
185 views

Access namespaced custom field method from a plugin into another plugin

In one of my previous questions, I learned how to properly set up a namespaced custom form field, but it turns out that it's only available within its plugin scope for some reason. I need the field ...
thednp's user avatar
  • 415