Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Nov 2012 at 20:08 UTC
Updated:
29 Jul 2014 at 21:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunI'd suggest to do this instead.
Comment #2
xjmAh, that's much cleaner.
I confirmed locally that this also fixes #1806334: Replace the node listing at /node with a view; however, I'm seeing a couple other failures locally.
Comment #3
xjmAh, the failures with
#2#1 are caused by the fact that Breakpoint only providesbreakpoint.yml, which I guess is not matched by listAll('breakpoint.').Comment #5
sunOh my. That's essentially why we badly need #1701014: Validate config object names
This means we have to rename
breakpointintobreakpoint.settingsas part of this patch.Comment #6
xjmThe problem is:
If the prefix is
breakpoint., then this pattern will only matchbreakpoint.*.yml. Weird that this hasn't caused other problems.Comment #7
xjmAh yes, #1701014: Validate config object names is the problem exactly. Edit: well, a complement to it, maybe we need to re-scope that issue a little. So we consider
breakpoint.ymlan invalid config filename, and the config filename must always have two(-plus) parts?Aside, finding the string
breakpointto replace it withbreakpoint.settingswithin the module directory is entertaining. Here's just the file rename as a start.Comment #8
sunExactly. Breakpoint's config object essentially is correctly namespaced, but it doesn't actually have a name. ;)
Comment #9
xjmUh. The fact that #7 passes makes me wonder about breakpoint's test coverage. We just renamed
breakpoint.multiplierstobreakpoint.settings.multipliers, so it seems like something should fail? I guess there's no coverage for whether defaults are installed.Comment #10
sunYou know. That's even better — at least as far as this issue is concerned (and the feature it is blocking).
Let's create a follow-up issue to unbreak Breakpoint module (LOL, pun intended) and add test coverage.
Comment #11
xjmYeah, as far as I can tell Breakpoint doesn't even use what's in that yaml file at all, so we're not actually even breaking anything that isn't already broken. Maybe it was intended for use once a UI was added?
Comment #12
sunLOL! How crazy is that? :-D
I'd say that makes an even better explanation than the previous one of no test coverage. ;)
So even better, we don't even break anything with that rename. :)
Comment #13
xjmPer webchick's request I tested existing breakpoints in standard with this patch applied and confirmed none of the behavior changes. The toolbar still flips its orientation from horizontal to vertical, and the primary navigation still switches from tabs to touch buttons. The text labels next to the icons also still get hidden.
Comment #14
xjmFiled #1851018: Improve breakpoint configuration implementation..
Comment #15
webchickHm. Let's definitely get a follow-up (probably a "major task") to figure out what's happening w/ Breakpoint module. I remember that going in with some weird workaround stuff for CMI that are probably still there, and I definitely didn't expect Toolbar to continue to work, since AFAIK it's piggy-backing off the Breakpoint module definitions.
In the meantime though, this seems simple enough, so committed and pushed to 8.x. Thanks!
Comment #17
tim.plunkett#1871774: ModuleTestBase::assertModuleConfig() assumes all of module's default config is owned by that module essentially reverts the assertion part of this fix, because all that was actually needed was the breakpoint file rename.
Essentially, it means that if a module provides a config file from another module's namespace, but doesn't have any in it's own, this will fail.
Full coverage for this will be added in #1776830: [META-1] Installation and uninstallation of configuration provided by a module that belongs to another module's API, but in the meantime this blocks #1779026: Convert Text Formats to Configuration System.
I'm marking my issue as a duplicate.
Comment #18
xjmI'm not sure #17 is the correct fix for this; it's unblocking one issue to block another.
Comment #19
tim.plunkettIf foo.module has foo/config/bar.baz.yml, that file should not be copied if bar.module is not enabled.
However, just because foo.module has a foo/config directory, that does not mean it requires a foo.*.yml file.
The first part is why this change was made. The second part is what this change broke.
We'll need to fix the logic within the assertion to support both.
Comment #20
tim.plunkettWell. Git does not allow empty directories. So if $module/config exists, as it already checks, then we don't need to prove that its a non-empty directory.
This line is not related to why this issue was originally fixed, and it is the offending line for my bug.
Comment #21
sunIn that case, we should keep the existing test coverage assertion (since it was introduced for a reason), but call ->listAll() two times, once without and once with module prefix, and assert that $all_names is non-empty.
Comment #22
tim.plunkettFair compromise :)
Comment #23
sun#1779026: Convert Text Formats to Configuration System is blocked by this issue — any chance to move forward with whatever we agreed on? :)
Comment #24
sunUnless I'm mistaken, what we want is this?
Comment #25
sunClarified comments + intentions for posterity.
Looks RTBC to me in case bot comes back green.
Comment #26
xjmYeah, this looks correct to me assuming it passes. The comments in #25 are excellent.
Comment #27
dries commentedCommitted to 8.x. Thanks.
Comment #28.0
(not verified) commentedUpdated issue summary.