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.
The submodule hosting_cron fails to execute cron for a D8 site via web.
The URL generated within the hosting_cron_queue function is only valid for D7 site.
It points to /cron.php?cron_key=CRONKEY, when it should be /cron/CRONKEY for a D8 site.
Comment | File | Size | Author |
---|---|---|---|
#3 | hosting-webbased_cron-2941470-3.patch | 1.55 KB | tucho |
Comments
Comment #2
tuchoComment #3
tuchoI uploaded a patch that verifies the site version using drush core-status and generates the correct cron URL for the detected Drupal version.
Comment #4
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedThanks,
Could we simplify this with
Comment #5
tuchoHi @helmo!
Thanks for your review.
I have tried using drush_drupal_major_version before using a direct call to drush core-status, but it always returns the version of the Hostmaster (D7).
I think, there may be some cache on this function that get always the version od the Hostmaster?
The code I run was:
And I get always 7, even for a D8 site.
Comment #6
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedI'd call that a bug in Drush. But in their defense, the function comment says "version number of the current Drupal installation," but then the (undocumented) $drupal_root is a bit misleading.
So it works as long as your not bootstrapped into the hostmaster site already. ( we are successfully using it in files like platform/provision_drupal.drush.inc)
The patch form #3 looks OK, it's on my dev server now for more testing.
Comment #8
helmo CreditAttribution: helmo at Initfour websolutions for Aegir Cooperative commentedmerged