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.

CommentFileSizeAuthor
#3 hosting-webbased_cron-2941470-3.patch1.55 KBtucho
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tucho created an issue. See original summary.

tucho’s picture

Issue summary: View changes
tucho’s picture

Status: Active » Needs review
FileSize
1.55 KB

I uploaded a patch that verifies the site version using drush core-status and generates the correct cron URL for the detected Drupal version.

helmo’s picture

Thanks,

Could we simplify this with

if (drush_drupal_major_version($docroot) == 8) {
tucho’s picture

Hi @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:


drush_log(drush_drupal_major_version($site->publish_path));

And I get always 7, even for a D8 site.

helmo’s picture

Status: Needs review » Reviewed & tested by the community

I'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.

  • helmo committed 8c4e413 on 7.x-3.x authored by tucho
    Issue #2941470 by tucho, helmo: Allow web-based cron for Drupal8 sites
    
helmo’s picture

Status: Reviewed & tested by the community » Fixed

merged

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.