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.
Ultimate cron upgrade fails from version 1.9 to 2.0 when running the Drush command as is errors on the table cache_ultimate_cron doesn't exist and causes the cron listing to not load.
I had to completely uninstall ultimate cron and reinstall to get it to work but I loose my settings. Please can there be a clean upgrade?
Comments
Comment #2
arnested CreditAttribution: arnested at Reload commentedComment #3
rviner CreditAttribution: rviner commentedComment #4
arnested CreditAttribution: arnested at Reload commentedI just had a look into this.
I think the problem could be that you must install ctools before you upgrade Ultimate Cron to 7.x-2.x.
Could you verify my assumption? If so I'll add it to the upgrade section on the module page and to hook_requirements().
Comment #5
arnested CreditAttribution: arnested at Reload commentedA change could look something like this:
The change to
ultimate_cron_flush_caches()
to catch for the situation where some cache clear runs before the cache table has been created.That would at least catch the situation where someone tries to enable ctools but has already upgrade the ultimate_cron code to 7.x-2.x (and you're using database cache).
I'm not sure adding that overhead to each cache clear is worth it, though.
Comment #6
rviner CreditAttribution: rviner commentedI can confirm your fix does work, thanks.
Note: I did already have ctools installed when I attempted to upgrade previously so the fix in my case comes within the change to ultimate_cron_flush_caches function.
Comment #7
arnested CreditAttribution: arnested at Reload commentedOk, good to know.
The only way I was able to trigger this so far was when missing ctools.
So the problem appears to be something triggering a cache clear before running all the update hooks of Ultimate Cron 2.x.
A couple of questions just to try to narrow it down:
schema_version
of Ultimate Cron before the update? (SELECT schema_version FROM system WHERE name = "ultimate_cron";
)Comment #8
rviner CreditAttribution: rviner commented1. I'm only updating ultimate cron on its own.
2. The schema version before the update is 7108.
Since you can only reproduce the issue without ctools installed I've carried out further testing and it only seems to be an issue on one of my sites with a lot of modules enabled so it must be some other module conflict (not sure what). However haven't ever come across this issue when upgrading any other Drupal module.
I tested this on a much simpler site than the one I tried to upgrade and it worked first time.
Comment #9
arnested CreditAttribution: arnested at Reload commentedThank you, @rviner.
Weird. Nothing wrong with schema_version or anything else apparently. Except not working :-)
Ultimate Cron 7.x-2.x creates a new cache table in update hook
ultimate_cron_update_7202()
. The cache table is then addedhook_flush_caches()/ultimate_cron_flush_caches()
(as should be).The problem must be that something on this one particular site triggers a clear cache before
ultimate_cron_update_7202()
get a chance to run.Any chance you'll be able to debug into when/where that happens?
Comment #10
rviner CreditAttribution: rviner commentedI've got to the bottom of the issue, updating it manually worked so the Drush version needed updating as it was still on version 5 and therefore none of the update hooks ran.
Thanks for helping me narrow down the issue, not sure why it didn't crop up on any other module upgrade.
Comment #12
arnested CreditAttribution: arnested at Reload commentedGlad you found your way around this!
I add a update requirements check on the existence of ctools. Although this was not your root cause it was at least a potential error for some users.
I'll close this and create a 7.x-2.2 release.