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.
Problem/Motivation
After installing a module, the module's stream wrappers are not available for the rest of the request.
This bug surfaces when installing a site via Drush in a language other than English, as in that case the whole installation is performed in a single request and thus, when trying to import translations into translations://
the corresponding stream wrapper, which is defined in locale.module
is not registered yet, even though locale
is installed.
Proposed resolution
Re-register stream wrappers after installing a module in ModuleHandler::install()
Remaining tasks
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2346035-8-pass.patch | 2.25 KB | tstoeckler |
#5 | 2346035-5-fail-2.patch | 2.21 KB | tstoeckler |
#5 | 2346035-5-fail-1.patch | 1.24 KB | tstoeckler |
Comments
Comment #1
tstoecklerHere we go.
The fail-1 patch demonstrates that this is a problem and the fail-2 patch verifies that the
drupal_static_reset()
is not enough on its own.Comment #5
tstoecklerHere we go.
Comment #6
tstoecklerComment #8
tstoecklerI'm an idiot. Sorry for the noise. The fail patches should be correct, though.
Comment #13
webflo CreditAttribution: webflo commentedThis patch allows multilingual installation with Drush and imports all existing translations from localize.drupal.org. Looks good to me!
Comment #14
catchCommitted/pushed to 8.0.x, thanks!
Comment #17
JvE CreditAttribution: JvE commentedAll static caches should be reset, not just the stream wrappers. See #1891356: D7: Reset drupal static caches when a module is enabled or disabled.