Skip to main content
5 votes
Accepted

How to add a composer package without modifying the core composer.json file

I suspect that modifying Joomla's root composer.json file will come with Joomla 4. In the meantime, I think the best way to use composer packages is to include a composer.phar in a custom system ...
jamesgarrett's user avatar
  • 3,329
5 votes

How to reverse-engineer a 3rd party Joomla extension to clone it and to be able to make modifications to it?

Normally a template should deal with the layout and the presentational elements. Having said that, I have to say that I haven't seen any template (including quickstart packages) coming with ...
FFrewin's user avatar
  • 19.8k
5 votes
Accepted

Using external library with a component

If you're only ever using a library within a single component then there's no reason not to include it in a folder in the component - this is the way that distributed components will generally handle ...
jamesgarrett's user avatar
  • 3,329
5 votes

Component Development PHP Version Check

Lots of components have a check like that. Here's the top of admin tools core install script eg. protected $minimumPHPVersion = '5.3.3'; public function preflight($type, $parent) { // ...
jamesgarrett's user avatar
  • 3,329
5 votes
Accepted

How is the relationship between template styles and menus stored in Joomla 3.x?

template_style_id column in #__menu table.
Sharky's user avatar
  • 11.7k
5 votes
Accepted

Why is my plugin not hooking into events?

Plugin class name must match the plugin name defined in manifest file. If you have this in the manifest: <filename plugin="installer_log">installer_log.php</filename> Then class name ...
Sharky's user avatar
  • 11.7k
4 votes
Accepted

Get Title from ID

You could try something like the following: public function onYOURFUNCTION($context, &$article, &$params) { $id = JFactory::getApplication()->input->getInt('id'); $load = $...
Lodder's user avatar
  • 26.9k
4 votes

How to use Github as an auto-update deployment server for Joomla 3.x extension

Have a look at the Weblinks repo It does exactly what you want to do. The updateserver points to the manifest hosted on that repo. Download packages are served from the repo as well. Of course you ...
Bakual's user avatar
  • 5,582
4 votes
Accepted

Errors de-crypting libsodium encrypted values from database

This works fine with a simple encrypt then decrypt, like... ...but when I write to a database and read back, I get the errors mentioned above. This is actually expected behavior, because the ...
Scott Arciszewski's user avatar
4 votes
Accepted

How to write a query with GROUP BY and ORDER BY using Joomla's query methods?

I see minor typos in each of your coding attempts (misspelled method names: selcet and loadObjectLsit). Write the GROUP BY order like so: (Reference Link) SELECT id, DATE_FORMAT(estEventDate, '%b %Y'...
mickmackusa's user avatar
  • 4,826
4 votes
Accepted

What is the different between JPlugin and \Joomla\CMS\Plugin\CMSPlugin

JPlugin is an alias of Joomla\CMS\Plugin\CMSPlugin. It is the same thing at the moment, but one should start using fully qualified class names because all aliases in Joomla! are deprecated and will be ...
Sharky's user avatar
  • 11.7k
4 votes

Coding Standard Question - defined( or \defined(

I asked this on the Joomla! internal development chat and was told the second one is the optimised version currently in namespaced files. Richard, a lead Joomla! developer wrote "Backslash makes ...
mfleeson's user avatar
  • 128
4 votes
Accepted

How to remove a file from a template using the installer?

You have to create an installer script. The provided generic installer, Joomla\CMS\Installer\InstallerScript, has some functionality for removing files and folders so you could extend it. Create a ...
Sharky's user avatar
  • 11.7k
4 votes
Accepted

How does a custom component store config.xml information

The error message is being displayed because there is an issue with the name of the config.xml or the path where it is located. There are no references stored in the data base relevant to the issue. ...
Irata's user avatar
  • 4,301
4 votes

How to create a (better) development environment for Joomla 4

I've not used Docker so I can't help with that, but I have xdebug set up on my local environment in combination with PHPStorm and that is a big help in enabling me to figure out why something's not ...
Grant Hood's user avatar
3 votes
Accepted

What dictates the HTML that is generated for Front-End Search Tools?

Your problem is jQuery's Chosen plugin. JS scripts are almost always added using the JHTML class and its child classes. I've only had a quick look, but I think the problem script is injected at ln: ...
Bathmat's user avatar
  • 502
3 votes

joomla loadFormData

I ran into this as well and have learned the following: the loadFormData can indeed used to load previously saved data back into the form and Joomla does not seem to set the form data to the user ...
Isolde's user avatar
  • 131
3 votes

How to use joomla getUserState and setUserState to keep form field values

This is the way I do it, I hope it helps you. in you view.html.php (view file) $app = JFactory::getApplication(); $this->data = $app->getUserStateFromRequest('com_yourcomponent.yourform....
Piero Marsilio's user avatar
3 votes

Custom message by menu item

Option 1 A quick way to do this is to install Regular Labs Sourcerer (or similar) and use a Custom HTML module with similar code to the following: {source} <?php $app = JFactory::getApplication();...
Neil Robertson's user avatar
3 votes
Accepted

Subform multiple data not saving

In your table's bind function, add this: if ( ( !empty( $array[ 'list_links_url' ] ) && ( is_array( $array[ 'list_links_url' ] ) ) ) ) { $this->_jsonEncode[] = "list_links_url";...
Stuart Steedman's user avatar
3 votes

Subform multiple data not saving

I know this is an old issue, but since a came across this post on my own research I would like to share my solution. Unfortunately I cannot trace back at which Joomla version this possibility was ...
Mark's user avatar
  • 31
3 votes

Set Prefered Template with parent:display()?

You can force the template style like this: $templateStyleId = 3; // set here the template style id $app = JFactory::getApplication(); JTable::addIncludePath(JPATH_ADMINISTRATOR . '/...
Dennis Heiden's user avatar
3 votes

What is wrong with this XML Package Installation file? Joomla cant find XML on Package

Ok, I discovered what the issue was.. It was just something very silly. The issue was that the XML on the pkg starts with: <?xml version="1.0" encoding="UTF-8" ?> And the XML on one of the ...
user1967509's user avatar
3 votes

Create SEF URLs from a Custom Component that does not search on database

One thing is, that you're trying to create a router in the old way, it changed over time. Now router is a class. Second thing is, one of your component views have to be set as a front-page for a ...
Artur Stępień's user avatar
3 votes

Errors de-crypting libsodium encrypted values from database

The error messages Invalid MAC and Argument 1 must be at least CRYPTO_BOX_MACBYTES long are definitely misleading. I had to try it for myself in order to find that both errors appear randomly based ...
Riccardo Zorn's user avatar
3 votes
Accepted

Reload admin form after save field in database

When you save the template with the JavaScript call saveTemplate(), you are sending an Ajax call to the server. This Ajax call is the one being redirected with a HTTP redirect. You are ignoring the ...
Javatasse's user avatar
  • 256
3 votes
Accepted

Use addScriptOptions for multiple modules on same page

A simple code review: You don't need the condition block because getScriptOptions() always returns an array. getScriptOptions() documentation If you want to declare the variable $configs... $configs = ...
mickmackusa's user avatar
  • 4,826
3 votes
Accepted

404 View not found [name, type, prefix]

I was able to resolve the issue. The DisplayController of the front-end part was lacking a proper constructor, once I added it the site part works as well. namespace Foo\Component\Bar\Site\Controller; ...
pollux's user avatar
  • 41
3 votes

How to create a (better) development environment for Joomla 4

I use PHPStorm + Xdebug. I used to use my own LAMP stack on my Linux computer. Earlier this year I switched to a very nice docker environment docker-lamp created by Guido De Gobbis. It's a bit ...
pe7er's user avatar
  • 2,068
3 votes

Does Jinput has a limit of max file size that supersedes PHP directives?

It could be because the file is detected as unsafe by file filter in Joomla. Unfortunately, the file filter is prone to false-positives which is most likely what's happening in your case. If you have ...
Sharky's user avatar
  • 11.7k

Only top scored, non community-wiki answers of a minimum length are eligible