User tests: Successful: Unsuccessful:
Avoid fatal PHP error on saving Task with incorrect user input.
Create new task in com_scheduler, select "Cron Expression (Advanced)" as "Execution Rule", do not choose any Minute, Hour, Day, Month or Day of Week in Cron Match section and save. Sames apply if you choose only some of these but not all.
PHP Error
Joomla\Component\Scheduler\Administrator\Model\TaskModel::wildcardIfMatch(): Argument #1 ($target) must be of type array, null given, called in ../administrator/components/com_scheduler/src/Model/TaskModel.php on line 637
Warning is raised, task not saved. User can correct input and save again.
Modified the Rule to reflect real cron expression rule type (it is not custom
but cron-expression
), plus added required
for subsequent fields in validation.
Applies to Joomla 5 also.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Administration |
Title |
|
@Quy not an alternative but a required additional #37536 (comment)
This is Joomla standard, show only up to 3 errors and is caused directly by FormController. Doesn't have to do anything with this PR. I do not think we should override this behavior just for this use case...
I have tested this item ✅ successfully on 54e89cf
Thanks for explanation @n3t.
I have tested this item ✅ successfully on 54e89cf
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
PR-4.4-dev
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-04 13:03:25 |
Closed_By | ⇒ | laoneo |
Thanks!
Alternative PR #37536 using JavaScript.