? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
23 May 2022

Pull Request for Issue #37806.

Summary of Changes

This PR fixes a small typo in the code cause web cron key not being generated when Web Cron enabled

Testing Instructions

  • See #37806 , confirm the issue
  • Apply patch, confirm the issue fixed.

Please note that I have zero experience with web cron feature, just try to fix this issue by reading the code quickly.

avatar joomdonation joomdonation - open - 23 May 2022
avatar joomdonation joomdonation - change - 23 May 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 May 2022
Category Front End Plugins
avatar brianteeman
brianteeman - comment - 23 May 2022

Strange that this is the fix as the code has always been this way and it obviously worked previously. I wonder what changed (elsewhere) to break this. Whatever it was, if it broke this then we should treat that as a red flag that it could have broken code elsewhere.

avatar joomdonation joomdonation - change - 23 May 2022
Labels Added: ?
avatar joomdonation
joomdonation - comment - 23 May 2022

@brianteeman I don't have any clue about it because I haven't looked at the code of schedule tasks feature before. From what I see (by just code reading), $table->name will return name of the component stored in #__extensions table . By looking at the table, it is com_scheduler, so compare it with COM_SCHEDULER is wrong and that's the reason the code below that is not executed. So I just fix this small typo here, tested and it solved the issue.

avatar toivo toivo - test_item - 23 May 2022 - Tested successfully
avatar toivo
toivo - comment - 23 May 2022

I have tested this item successfully on b09ee6b

Tested successfully in Joommla 4.1.4-rc2-dev of 23 May in Wampserver 3.2.8 using PHP 8.0.15


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37868.

avatar brianteeman
brianteeman - comment - 23 May 2022

Just did a quick test on an existing 4.1.3 site where the webcron key is not generated. I applied the patch from here. No change. Still cant generate the key. my mistake

avatar joomdonation
joomdonation - comment - 23 May 2022

Hmm. The patch worked for me for both 4.1 and 4.2, but for my local site, it is a new installation, not updating from old version of Joomla.

@brianteeman Could you please changed that line of code to the code below, then test it again to see if it works?

if ($context !== 'com_config.component' || strtolower($table->name) !== 'com_scheduler')
avatar brianteeman brianteeman - test_item - 23 May 2022 - Tested successfully
avatar brianteeman
brianteeman - comment - 23 May 2022

I have tested this item successfully on b09ee6b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37868.

avatar joomdonation joomdonation - change - 23 May 2022
Status Pending Ready to Commit
avatar joomdonation
joomdonation - comment - 23 May 2022

RTC. Thanks all !


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37868.

avatar heelc29
heelc29 - comment - 25 May 2022

Strange that this is the fix as the code has always been this way and it obviously worked previously. I wonder what changed (elsewhere) to break this. Whatever it was, if it broke this then we should treat that as a red flag that it could have broken code elsewhere.

@brianteeman It broke with your PR #37387

avatar brianteeman
brianteeman - comment - 25 May 2022

@heelc29 and now we know why - thanks

avatar bembelimen bembelimen - change - 5 Jun 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-06-05 22:14:03
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 5 Jun 2022
avatar bembelimen bembelimen - merge - 5 Jun 2022
avatar bembelimen
bembelimen - comment - 5 Jun 2022

Thx

avatar stefanwillig
stefanwillig - comment - 7 Jun 2022

confirmed, it works! Thank you!

Add a Comment

Login with GitHub to post a comment