Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In any ultimate cron log (admin/config/system/cron/jobs/logs/{ultimate_cron_job}), if you have an error, e.g. a fatal error, then the error message is only shown when you hover on the icon. In that case, the error should replace the normal message.
Current UI:
UI should be something like:
Proposed resolution
- fix it (probably in \Drupal\ultimate_cron\Controller\JobController)
- upload resulting screenshots
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#15 | logger_errors-2687573-15.patch | 9.09 KB | tduong |
| |||
#15 | logger_errors-2687573-15-test_only.patch | 3.78 KB | tduong |
#15 | interdiff-2687573-12-15.txt | 1.85 KB | tduong |
#12 | logger_errors-2687573-12-interdiff.txt | 1 KB | Berdir |
#12 | logger_errors-2687573-12.patch | 9 KB | Berdir |
Comments
Comment #2
tduong CreditAttribution: tduong at MD Systems GmbH commentedComment #3
tedbowHere is tests only patch that test for 2 things
Neither of these pass right now. I think this should be the expected behavior but let me know if not.
Comment #5
tduong CreditAttribution: tduong at MD Systems GmbH commentedYour test makes sense, but still misses what we want to check.
I've imported your test yaml file, and running your cron job throws the fatal error, correct. What we want to change is when there is such an error, the message in the admin/config/system/cron/jobs/logs/ultimate_cron_logger_test_cron table should be
instead of
Launched manually by admin (1)
. As mentioned in the "proposed solutions" the fix is in JobController, add an additional statement in the check for the message column, something like$log_entry->message == "no info"
, so the error message should be displayed in the message column.Anyway, I don't know why the test does not get a fatal error. I've also ran it locally and have the same problem, but when manually testing it, it works as we expected.
Let's fix it first and then ask why the test does not pass.
I've updated and uploaded some screenshot in the summary.
Comment #6
tduong CreditAttribution: tduong at MD Systems GmbH commentedDuring manual test I've just imported the yaml text but forgot to enable the test module, that's why the fatal error appeared.
After discussion with @Berdir, he thinks that that yaml file is not needed, so we dropped it. I've reinstalled drupal and enabled the test module and haven't get the fatal error anymore.
Anyway during debug we saw something strange and he said he will take a look on this issue.
Here I've added a fix but IMO it is ugly and too long.
Comment #8
tduong CreditAttribution: tduong at MD Systems GmbH commentedForgot to reroll the patch...
Comment #10
BerdirThis didn't work in the test because what you did is throwing an exception not a fatal error. This was also broken though, so I fixed that and did some general cleanup. Also created some follow-ups.
Comment #12
BerdirFixed some tests.
Comment #14
BerdirAnother follow-up: #2730953: Update hook_watchdog implementation.
Need to figure out the 5.6 error tomorrow on a system that has 5.6
Comment #15
tduong CreditAttribution: tduong at MD Systems GmbH commentedDiscussed with @Berdir, fixed test.
Comment #18
BerdirComment #19
BerdirCommitted.