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.
Some module (like those with default content) can take quite a long time to install/enable. Batch modules one at a time to ensure we get the best chance to not hit max execution time.
Comment | File | Size | Author |
---|---|---|---|
#3 | apps-rework-batch-1750240-3.patch | 10.54 KB | nedjo |
Comments
Comment #1
populist CreditAttribution: populist commentedComment #2
nedjoSee http://drupalcode.org/project/subprofiles.git/blob/refs/heads/7.x-1.x:/s... for working code to do this.
Comment #3
nedjoAttached patch reworks app enabling to use per-module batches, both at install time and in post-install app enabling.
As well as addressing potential out of memory errors, this approach has the advantage of using the same code for install-time and post-install app enabling.
#1572578: Rethink the way features are enabled / disabled is related, in that it addresses a distinct source of out of memory errors when enabling apps.
A few outstanding questions are noted in TODO code comments. Specifically:
Prior to the patch, on app enabling, those with access are redirected to a config page if one exists, unless app enabling fails. To maintain this functionality, we need to conditionally change the redirect passed to batch_process(). Is this the best way to do so?
Is there a better way to test for install time usage?
Prior to this patch, an app's 'post install callback' was called for apps enabled individually post-install but not at site install time. Now the callback will be called in both cases. Is this desired?
Comment #4
nedjo