Closed (fixed)
Project:
Scheduler
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2016 at 13:16 UTC
Updated:
26 Mar 2017 at 18:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gmaxwelled commentedComment #3
jonathan1055 commentedHi gmaxwelled,
Thanks for spotting this. Amazing that no-one has seen it yet, as entering an invalid letter also causes two runtime exceptions in addition to the incorrect message that Scheduler shows. Whoever converted this from 7.x could not have tested it very well ;-)
Thanks for the patch. I think we need test coverage for the admin form, so I will do that before committing this fix.
Cheers
Jonathan
Comment #4
jonathan1055 commentedHere is a new test file
SchedulerAdminSettingsTestwhich checks the messages when the settings are saved. This patch just has the new tests, so it should fail.Comment #5
jonathan1055 commentedAs expected the tests failed - not a failed assertion but the more serious "Exception: User error: Invalid placeholder".
New patch with code fix (as from the patch by gmaxwelled) plus the new tests.
[odd, that the test failure did not set the issue status to 'needs review' and post an extra comment like it used to do]
Comment #6
jonathan1055 commentedTests pass, but there are three coding-standards problems (that's a nice new feature in d.o. test output) in SchedulerAdminForm.php. Not introduced by this patch, but in other places in the file altered by this patch. Hence might as well fix them here.
Comment #7
jonathan1055 commentedComment #9
jonathan1055 commentedCommitted.
Thanks gmaxwelled for raising the issue and providing the first patch.
Jonathan
Comment #10
jonathan1055 commentedWhen writing the new tests and checking against the actual admin settings validation, I realised that we do not validate against a missing date part. It makes no sense to allow this through, so I added validation and expanded the tests.
Comment #12
jonathan1055 commentedDone.