Off-shoot from #626286: Make contextual links a module:
When one installed module registers a permission, and you install another module that registers the same permission, then the module installation fails, because User module tries to insert all of the module's permissions as raw database query instead of using its own user role API functions.
This situation can happen more often than you think, because two related but otherwise independent modules can implement the same or common permission.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | drupal.user-modules-installed.3-test-only.patch | 985 bytes | sun |
| #2 | drupal.user-modules-installed.2.patch | 1.15 KB | sun |
| drupal.user-modules-installed.0.patch | 1.07 KB | sun |
Comments
Comment #2
sunerrrr. Silly me.
Comment #3
sunLet's see whether we are able to test this.
This patch is expected to fail.
Comment #4
dries commentedJust when you want a test to fail, it doesn't. :)
Comment #5
sunDamn. It passes, because the system_test is installed during setUp, where also system module is installed, and since the permissions of the installed modules are merged, the error is not triggered.
I spent some time tinkering about whether we can test this somehow, but we'd have to go through heaps to do so. We would need to "un-hide" a testing module that contains an already existing permission, so we can enable it on the modules page, because only when installing modules iteratively, this bug is triggered.
So I think we should just commit #2.
Comment #6
sunLet's put this in the RTBC queue and see whether someone has strong objections.
Comment #8
sunComment #9
webchickLooks like there is indeed no easy way to test this, but this shouldn't hold up the bug fix.
Committed #2 to HEAD.