Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
node system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Aug 2014 at 17:31 UTC
Updated:
23 Sep 2014 at 10:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexpottInitial crack at the patch.
Comment #2
alexpottOnce #2260457: Allow config entities to remove dependent configuration keys when dependencies are deleted due to module uninstall lands we can remove these settings on module uninstall.
Comment #3
xjm@effulgentsia pointed out that this is a schema addition, so no beta deadline. Makes sense as a beta target though.
Comment #4
alexpottThis should leverage the ThridPartySettingsTrait that will be added by #2224761: Add a generic way to add third party configuration on configuration entities and implement for field configuration
Comment #5
swentel commentedGo!
Comment #6
berdirNice, will give this a try. This will overlap with #2226493: Apply formatters and widgets to Node base fields, which is cleaning up bogus node type options, would be awesome to get reviews/RTBC over there and get it out of the way.
Comment #7
berdir/me like ThirdPartySettingsTrait.
Based on the discussion in the other issue, I also killed of node.type.settings and moved the few remaining things to separate top-level properties, with better names and methods.
One thing I'm not sure about is the forced default value that you have to provide. It has the advantage that it immediately solves the problem that it is currently impossible to provide default node types with non-default menu_ui menu settings, as it forcefully overrides it, but it is a bit tedious to repeat and very unlike other configuration behavior (where the defaults stick and don't change when the coded default changes).
Will probably need some test for menu_ui default configuration/sync to make sure the schema stuff and so on is right, but a manual export test worked fine.
Comment #9
berdirFixing those tests.
Comment #11
berdirWell, that is a disturbing amount of tests that create nodes with non-existing types.
We might want to add an existence check back, I'm surprised that actually still "works" but figured it makes sense to clean up those tests anyway, it's going to hurt us sooner or later.
Comment #13
slashrsm commentedTwo more tests fixed.
Comment #14
marcingy commentedLooks sensible!
Comment #15
berdirThis is still tagged with Needs tests, but I think we should be pretty good here.
I'm not sure if there was any profiling done on this and it's less a problem now with the render cache, but at least the comment above loading the node type needs to be updated. Setting back to needs work for that.
It might also make sense to wait before committing this until @alexpott is back, so he can confirm that this is in line with what he had in mind.
Another thing is $node->type->entity, we use that in a few places, not sure if we want to add a method for it. There is an issue somewhere that getType() is incorrectly named as it returns the ID of the type and not the type object. But the interesting/weird thing is that the ID property of node types is type, and getTypeType() would *not* make sense ;) But if we keep that, then I don't know how to name a method that returns the node type entity...
Comment #16
swentel commentedgetNodeTypeType() !
Comment #17
alexpottThis patch looks great - I really the removal of the menu.entity.node configuration object.
This can be removed now.
Comment #18
berdir- Removed the comment
- Removed the use
- #2333985: Migrate menu_default_node_menu setting. Fun stuff.
For change record, I'm thinking about what exactly we want, possibly two?
- One that just says that the specific menu settings are now third party settings of nodes and how to access them, possibly with a reference to the second.
- And a generic one that describes how to convert the 7.x node_type variable tricky to third party settings, as done here (with #entity_builders and stuff).
Makes sense?
Comment #19
benjy commentedI quite like this but I can't see anywhere in the issue where it was discussed to rename these? Surely this is a beta blocker if we're going to rename these?
Comment #20
berdir@benjy: I kind of agree. This is already tagged as beta target and a critical (which is a strange combination). Anyway, it should be ready except the change records.
Also, it's not just those renames. Moving the menu_ui configuration to third party settings is just as big a change.
Comment #21
berdirDone:
Generic change record: https://www.drupal.org/node/2334447
Menu-specific changes: https://www.drupal.org/node/2334449
there are existing issues for $node->type->entity/$node->getType(), I think we don't need to change this here.
Who wants to RTBC? :)
Comment #23
alexpottWe've got test coverage, migration, change records, and I don't think performance is a concern here - let's get this done.
Comment #25
berdirRe-roll, being optimistic.
Comment #27
berdirClearly being too optimistic again.
Comment #29
berdirFixing the new test.
Comment #30
slashrsm commentedComment #32
catchJust a note on this, it is a bit weird but I think it works:
Critical -> has to be done before release.
Beta target -> might have some impact on contrib modules and/or require data migration, however the change doesn't have enough impact to require actually blocking the beta.
So critical/beta target represents changes that we will do right up until RC, but are going to be more annoying (upgrade path needs writing, handful of contrib modules might get broken) the later they get done.
Committed/pushed to 8.0.x, thanks!