#2324121: NodeType's settings array was meant to be able to store information from mutliple modules is making the "which menus are available for a node type" part of the node type config entity by using the new third party settings API.
In D6, we only had a single setting, for the default menu (menu_default_node_menu), I think we need to do something similar to menu_update_7000() to make sure that the setting still makes sense in 8.x?
For D7, we will need to migrate them from the old per-node-type variables (as seen in the update function) to third party settings. In general, we possibly need support for those on config entities.
Comment | File | Size | Author |
---|---|---|---|
#15 | interdiff.txt | 19.43 KB | quietone |
#15 | 2333985-15.patch | 37.48 KB | quietone |
#12 | 2333985-12.patch | 10.37 KB | quietone |
#5 | menu_default_node_menu.patch | 1.57 KB | jarsenx |
Comments
Comment #1
jarsenx CreditAttribution: jarsenx commentedComment #2
ultimikeSome initial research:
1. In D6, we need to migrate the "menu_default_node_menu" variable. This is set on admin/build/menu/settings ("Default menu for content").
2. In D7, there are 2 related variables per content type for default menu settings:
a. menu_options_{content type}
b. menu_parent_{content type}
3. In D8, there are 2 related configuration values per content type for default menu settings:
a. third_party_settings.menu_ui.available_menus
b. third_party_settings.menu_ui.parent
The logic used in menu_update_7000() in D7/modules/menu/menu.install is something like this:
Therefore, the logic for D6->D8 should be something like this:
So, for the D6->D8 migration...
This migration must be run for each content type, so I don't think adding "menu_default_node_menu" as a source variable to migrate_drupal/config/install/d6_menu_settings.yml is the right way to go.
I'm pretty sure we need to modify the d6_node_type source plugin to grab the menu_default_node_menu variable and create new source properties for available_menus and parent. Then, in the d6_node_type.yml, we need to map these new source properties to their corresponding configurations. Give it a shot and let me know.
-mike
Comment #3
jarsenx CreditAttribution: jarsenx commentedIssue status update
ultimike gave me a patch to try for solving this issue. I applied the patch and ran the migration, now I want to describe my approach and the results I observed.
Preparation
Running the migration
Running d6_node_type [ok]
Running d6_field [ok]
Running d6_field_instance [ok]
Running d6_view_modes [ok]
Running d6_field_formatter_settings [ok]
Running d6_field_instance_widget_settings [ok]
Running d6_filter_format [ok]
Running d6_node_settings [ok]
Running d6_node [ok]
Results
Questions
Comment #4
ultimikeJoe,
In part 1 above, you said, "I tried setting the menu Parent item for each piece of content but when I save them they keep reverting to Secondary links." - I tried to reproduce this behavior, but couldn't. Setting the parent menu item appeared to work fine for me.
Can you attach the patch here? It's been awhile since we worked on it and I don't have it anymore...
Thanks,
-mike
Comment #5
jarsenx CreditAttribution: jarsenx commentedHmm, I'll take another look at setting the menu Parent item values in D6.
Here's the patch.
Thanks.
--Joe
Comment #6
quietone CreditAttribution: quietone as a volunteer commentedComment #10
mikeryanComment #11
quietone CreditAttribution: quietone as a volunteer commentedOn a first look the approach in the existing patch looks reasonable. And a list of things to do.
TODO:
D6
D7
Comment #12
quietone CreditAttribution: quietone as a volunteer commentedThanks to ultimike's thorough notes in #2 it was straightforward to build on the patch by jarsenx.
This has migrations for d6 and d7 and the tests.
Comment #14
quietone CreditAttribution: quietone as a volunteer commentedLooks like menu_ui needs to be enabled for all the failed migration tests.
Comment #15
quietone CreditAttribution: quietone as a volunteer commentedAdded menu_ui to $modules in the tests. Hopefully, I fixed them all.
Comment #16
quietone CreditAttribution: quietone as a volunteer commentedUnassigning so someone can review.
Comment #17
heddnAssigning to myself for review. If someone else get to it before me, don't feel stopped from doing your own review.
Comment #18
heddnThis pulls over the data from D6 & D7 just fine. Tests look complete.
Comment #20
catchCommitted/pushed to 8.4.x and cherry-picked to 8.3.x. Thanks!