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.
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#11 | allow_cron-2030017-11.patch | 1.6 KB | balsama |
#6 | allow_cron-2030017-6.patch | 1.6 KB | balsama |
#5 | allow_cron-2030017-6.patch | 1.27 KB | balsama |
#1 | cron_fails-2030017-1.patch | 440 bytes | balsama |
Comments
Comment #1
balsamaPatch attached.
Comment #2
balsamaSince the D7 module does allow you to exclude paths, an alternate approach might be to set the default value of `shield_excluded_paths` variable to cron.php. Either way, I think something should be done because it's not obvious that enabling and configuring this module will break functionality.
If the maintainer prefers the `shield_excluded_paths` approach, I can provide a patch for that as well.
Comment #3
kalman.hosszu CreditAttribution: kalman.hosszu commented@balsama
Thank you for your patch but I don't think that is a good idea to hardcode a bypass. The exclude idea is good but the problem is that the cron.php is "out of Drupal" so it's not available in GET['q']. However we could append the admin interface with a checkbox to enable run cron from browser.
What do you think?
Comment #4
balsamaRight. It would require rewriting the logic in the exclude path functionality. I'll provide another patch with the same functionality as my previous, but with a checkbox like you already have for drush.
I really can't think of a scenario where you wouldn't want to bypass cron and drush, but that's probably a separate issue (and may have already been considered/discussed).
Comment #5
balsamaPatch attached.
Comment #6
balsamaRerolled the patch against the latest dev version. This patch also includes deleting the cron variable on uninstall which was missing from the previous.
Comment #7
kalman.hosszu CreditAttribution: kalman.hosszu commentedThe created variable should delete during the uninstall process.
EDIT: sorry i wrote it before you sent the upgraded patch.
Comment #8
kalman.hosszu CreditAttribution: kalman.hosszu commentedWhen I try to apply your patch I get the following error message:
Is 7.x-1.x the repository that you use and it is up-to-date?
Comment #9
balsamaIt applies cleanly for me. Sounds like you might have tried to apply it twice or you made a different change to the .install file.
I'm definitely running off the latest 7.x-1.x version:
Comment #10
kalman.hosszu CreditAttribution: kalman.hosszu commentedWould you pull the branch?
It seems that your git HEAD is not up-to-date.
Comment #11
balsamaAha! Here we go. Updated patch attached. Applies cleanly to 434aeb3.
Comment #12
kalman.hosszu CreditAttribution: kalman.hosszu commentedThanks for the work, I have just committed it: http://drupalcode.org/project/shield.git/commit/4ff6131
Comment #13
kalman.hosszu CreditAttribution: kalman.hosszu commented