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.