#1515 Posted in ‘Econa’

Latest post by Jip Jonker on Saturday, 09 May 2026 00:59 EEST

Jip Jonker

Plugin version: 2.2.1
Joomla version: 6.1
PHP version: 8.4

Description:

After updating to Joomla 6.1, the Joomla CLI scheduler (cli/joomla.php scheduler:run --all) produces 0 bytes output and silently exits with code 0. All scheduled tasks stop running. No error is shown anywhere.

Root cause:

The file plugins/system/econa/src/Console/EconaUpgradeCommand.php contains the following on line 11:

    \defined('JPATH_PLATFORM') or die;

JPATH_PLATFORM is a Joomla 3/4 constant that was removed from Joomla 6 core. When the CLI bootstraps and fires the ApplicationEvents::BEFORE_EXECUTE event, Econa::onBeforeExecute() is called, which instantiates EconaUpgradeCommand. PHP's autoloader loads EconaUpgradeCommand.php, hits the \defined('JPATH_PLATFORM') or die guard, and since JPATH_PLATFORM is not defined, die executes immediately — silently terminating the entire PHP process with exit code 0.

This only manifested after J6 because in Joomla 5 JPATH_PLATFORM was still defined in core. In J6 it was removed. The plg_behaviour_compat plugin re-defined it as a legacy bridge, masking the bug for sites that had compat enabled.

Impact:

Any Joomla 6 site with Econa installed and plg_behaviour_compat disabled will have its entire CLI scheduler silently broken. No warning, no log entry, no error — just 0 bytes output and no tasks executing.

Fix:

Remove line 11 from EconaUpgradeCommand.php, or replace it with:

    \defined('_JEXEC') or die;

_JEXEC is still defined in Joomla 6 and will not cause issues. However, in a namespaced class file loaded exclusively via PHP's autoloader, any direct-access guard is unnecessary — the file can never be accessed directly via URL.

Steps to reproduce:

1. Install Econa on a Joomla 6.1 site
2. Disable plg_behaviour_compat (Plugin Manager > Behaviour > Backward Compatibility)
3. Run: php cli/joomla.php scheduler:run --all
4. Observe: 0 bytes output, exit code 0, no tasks executed

Workaround (until fix is released):
Either enable plg_behaviour_compat, or manually edit EconaUpgradeCommand.php and remove/replace line 11.

Jip Jonker

If it is at all possible I would like to have a (dev) version to install on all our sites to fix this issue so I don'' t have to manually fix this on all our sites.

Kind regards,
Jip Jonker

Lefteris Kavadas

Hi Jip,

Thank you for the detailed report and root-cause analysis — that was extremely helpful.

You were absolutely correct regarding the JPATH_PLATFORM guard and the behaviour difference between Joomla 5 and Joomla 6 when plg_behaviour_compat is disabled.

I have just released Econa v2.2.2 which includes a fix for this issue, along with a couple of other minor improvements.

Updating to v2.2.2 will resolve the CLI scheduler problem on Joomla 6 sites without requiring manual edits or enabling the compatibility plugin.

Thanks again for taking the time to investigate and report this so thoroughly.

Kind regards,  
Lefteris

Jip Jonker

Thanks for you quick action and release of the new version Lefteris! 

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review