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.
It seems $_SESSION is lost when doing batch jobs in the background, and this causes the update.php script to fail. The issue might also arise for other batch jobs that rely on $_SESSION.
Comments
Comment #1
gielfeldt CreditAttribution: gielfeldt commentedWhile $_SESSION might be an issue, it does not seem to be that which is causing problems with update.php, but rather "offline" mode. Investigating "delivery_callback" which might be the problem?
Comment #2
gielfeldt CreditAttribution: gielfeldt commentedThe issue was a combination of session not carried through on background process requests and update.php handling batch itself. Fixed in 7.x-1.x-dev by reusing session for early permission check, and not override update.php batch operations.
Comment #3
gielfeldt CreditAttribution: gielfeldt commentedComment #4
gielfeldt CreditAttribution: gielfeldt commentedWould like support for update.php in Background Batch.
Comment #5
gielfeldt CreditAttribution: gielfeldt commentedComment #6
gielfeldt CreditAttribution: gielfeldt commentedNote: Getting background batch to work for update.php might not be possible in D6 due to update.php handling some of the batch stuff itself. It might be possible in D7+ using hook_batch_alter().
Comment #7
Elijah LynnWe should at least just get it working without background_batch.