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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler’s picture

Status: Active » Needs review
FileSize
1.24 KB
2.17 KB
2.21 KB

Here 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.

The last submitted patch, 1: 2346035-1-fail-1.patch, failed testing.

The last submitted patch, 1: 2346035-1-fail-2.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 1: 2346035-1-pass.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
1.24 KB
2.21 KB
2.21 KB

Here we go.

tstoeckler’s picture

Issue tags: +Amsterdam2014

Status: Needs review » Needs work

The last submitted patch, 5: 2346035-5-pass.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
2.25 KB

I'm an idiot. Sorry for the noise. The fail patches should be correct, though.

The last submitted patch, 5: 2346035-5-fail-1.patch, failed testing.

The last submitted patch, 5: 2346035-5-fail-2.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 8: 2346035-8-pass.patch, failed testing.

Status: Needs work » Needs review

tstoeckler queued 8: 2346035-8-pass.patch for re-testing.

webflo’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +sprint

This patch allows multilingual installation with Drush and imports all existing translations from localize.drupal.org. Looks good to me!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.0.x, thanks!

  • catch committed 9c4c34a on 8.0.x
    Issue #2346035 by tstoeckler: Fixed ModuleHandler::install() should re-...

Status: Fixed » Closed (fixed)

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

JvE’s picture

All static caches should be reset, not just the stream wrappers. See #1891356: D7: Reset drupal static caches when a module is enabled or disabled.