New answers tagged

0

In relation to your code the issue is you are not returning the data from the fetchData() so that it can be used by the createArticle(). This value of $articleData is empty at this point. // Run the createArticle bulk data import to articles function $this->createArticle($articleData); Update your code with // Fetch the JSON data $articleData = $this->...


2

I found when running CLI scripts that other things that you don't really need to execute, i.e. plugins, will cause failures because they don't check themselves to disable if they are running under a CLI environment and so they call things that aren't available to you and fail your script. To 'ignore' these errors I add several lines to bottom of my class to ...


1

This may be an issue with the filter value, either in the field plug-in settings, or in the settings. The editor field type has four options for filter: No Raw SafeHTML Text Perhaps try setting the filter to "Raw" and see if this still happens. The default is 'Text' in Joomla 4. The editor field plug-in settings look like this, see the Filter ...


0

Lodder answer is certainly useful, but not what I wanted to see. The correct loading of the embedded jquery looks like this. use Joomla\CMS\Factory; $wa = Factory::getApplication()->getDocument()->getWebAssetManager(); $wa->useScript('jquery'); This will work if jquery has not been loaded before.


2

There are a few ways in Joomla to solve this problem. Some ideas in order of best practice to not recommended are: 1. Template "Advanced" or "Custom" Feature Check if your template has an option to insert code. For example, The Helix Ultimate template from JoomShaper allows you to insert code in Before </head>, After <body> ...


0

This error usually means that Joomla has failed to connect to the database. Check that the database credentials are correct. Also check that the relevant options e.g. mysqli are enabled in PHP. If you are using cPanel, PHP options are found under "Select PHP Version".


6

You should be able to load it like so: Joomla\CMS\HTML\HTMLHelper::_('jquery.framework'); Else, if you're using Joomla's Web Asset Manager, then you can define it as a dependency in your JSON object: { "name": "foobar", "type": "script", "uri": "com_mycomponent/script.min.js", "...


0

Plugins and Module don't have their own Admin Menu items. In the back-end via "Menus > Manage" you can create new Admin Menu items but only to Component Views. There's an option to create Menu Items of Menu Item Type "System Links > URL" but you cannot use that to trigger your Modules or Plugins.


Top 50 recent answers are included