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 ...
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 ...
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 ...
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)
{
// ...
5
votes
Accepted
How is the relationship between template styles and menus stored in Joomla 3.x?
template_style_id column in #__menu table.
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 ...
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 = $...
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 ...
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 ...
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'...
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 ...
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 ...
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 ...
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.
...
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 ...
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: ...
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 ...
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....
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();...
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";...
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 ...
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 . '/...
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 ...
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 ...
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 ...
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 ...
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 = ...
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;
...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
development × 391joomla-3.x × 163
component × 103
plugin × 60
extensions × 35
joomla-api × 34
php × 33
custom-component × 28
module × 26
joomla-2.5 × 23
joomla-4.x × 22
mvc × 19
templates × 14
database × 13
mysql × 11
joomla-3.3.x × 10
form × 10
joomla-3.4 × 8
jquery × 8
ajax × 8
system-plugin × 8
custom-field × 7
jform × 7
javascript × 6
user × 6