Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently when using menu block via panels the raw mlid is being saved instead of the feature. Instead menu block should detect if UUID is installed and favour using UUID over MLID where possible.
Comment | File | Size | Author |
---|---|---|---|
#23 | menu_block-uuid-2282933-23.patch | 4.23 KB | hswong3i |
#14 | uuid_menu_block-2282933-14.patch | 4.22 KB | joseph.olstad |
#13 | uuid_menu_block-2282933-13.patch | 5.86 KB | joseph.olstad |
#2 | uuid_menu_block-2282933-01.patch | 5.68 KB | sylus |
Comments
Comment #1
sylus CreditAttribution: sylus commentedComment #2
sylus CreditAttribution: sylus commentedAttaching patch that can be applied to Menu Block 2.4.
Comment #3
sylus CreditAttribution: sylus commentedThis patch also encompasses a minor patch for i18n mode 5 support (that has been tested) to prevent patch conflict in drush make.
See comment #20 in #2199997: Improve the whole menu workflow.
Comment #4
sylus CreditAttribution: sylus commentedPatch has been tested in a few environments and Behat hasn't failed detecting any menu blocks.
Comment #7
sylus CreditAttribution: sylus commentedActually took this patch out at last second as wanted more testing.
Comment #8
lampson CreditAttribution: lampson commentedWhat steps should I take to test this patch?
Comment #9
joseph.olstadLampson, this patch has been running in production for quite some time. If we upgrade to 1.8 we would lose the patch, as it's been removed. We'd have to re-apply the patch.
Comment #10
lampson CreditAttribution: lampson commentedThis patch has been tested by creating many menus and adding them to a feature on the source site and reverted it on the destination site. No issues. Please add this patch to next release.
Comment #11
joseph.olstadOk, we need that patch refactored, however it only applies on the old revision of menu_block
the patch needs to be refactored for menu_block v7.x-2.4 currently used by wetkit_core
projects[menu_block][version] = 2.4
the patch previously only applied on 7.x-2.3+37-dev
projects[menu_block][download][revision] = 32ab1cf
but it no longer applies
Sylus, can you please refactor this patch for us? :)
Comment #12
joseph.olstadthis is the diff between 2.4 and 2.3 dev hash 32ab1cf
Comment #13
joseph.olstadI've refactored the patch we were previously using for menu_block v 2.3
the new refactored patch will apply for menu_block v2.4 , we'll have to do a test on it, but I'm very confident that having run the patch for several months in production that the bulk of it has been tested, just two lines of code were refactored in the patch. See the last part of the menu_block_menu_tree_content_type_edit_form_submit function, the last two lines come from v2.4 that were not present in v.2.3
See attached patch: (patch 13 is for wetkit 1.8 (probably also wetkit 4.x)) for menu_block v2.4
the original patch 1 is for wetkit 1.4 (which used menu_block v2.3)
Comment #14
joseph.olstadthe patch from comment #13 will not apply if you previously are using the two other patches specified in witkit_core.make
so I made a new patch that will apply after the other two patches have been applied.
there should be a third patch added
projects[menu_block][patch][2282933] = http://drupal.org/files/issues/uuid_menu_block-2282933-14.patch
see attached patch for uuid support with menu_block for wetkit
Comment #15
sylus CreditAttribution: sylus commentedThis has been added to both branches. I would feel more comfortable with a behat test in place that tested this with / without uuid logic. But shouldn't hold up this issue for now.
Comment #18
joseph.olstadAs per comment 15
Comment #19
joseph.olstadOk, had another look at this patch....
Here's the API documentation for ctools_uuid_is_valid.
if a valid uuid is passed into ctools_uuid_is_valid then true is returned, otherwise false.
but yet in the patch there's this section of code:
I think this function call "ctools_uuid_is_valid" in this case will always return FALSE , unless there's a UUID somewhere inside $conf['parent_mlid']
I'm just wondering if $conf['parent_mlid'] will ever contain a UUID, it'd be handy to watch the variable $conf['parent_mlid'] during menu link creation.
We should have a closer look at this, it might be why PTS's patch is not working in my last test.
I suspect this patch might not be doing what its intended and might be causing the patch in "Menu link translations are not being linked together" to fail
Comment #20
sylus CreditAttribution: sylus commentedThis has nothing to do with menu links and is exclusive to the menu block module particularly only to the CTools Plugin.
The parent_mlid will either contain a UUID or its regular form of just mlid. We check to see whether it is a UUID or gracefully degrade if not valid.
Comment #21
joseph.olstadoh yes of course, in the case that uuid is enabled the plid should actually contain the uuid of the parent menu link item.
just looked strange, thanks for clarifying. I'll look at the related issue "Menu link translations are not being linked together (2394485)" as a seperate issue. Should be fun debugging that one.
Comment #23
hswong3i CreditAttribution: hswong3i commentedRe-roll #14 via menu_block-7.x-2.x-dev
Comment #24
Ronino CreditAttribution: Ronino as a volunteer commentedThis looks promising! But did I miss something or how do menu items/links get UUID's? The latest uuid module doesn't seem to support it and besides that I only found not actively developed sandbox projects to create UUID's for menu items.
Comment #25
sylus CreditAttribution: sylus commentedYou need entity_menu_links to take advantage of this.