Blocks #3051251: Existing menu links show validation issues on migration (and ALL menu links pointing to node translations are invalid) if it will solved by menu link migration derivatives.
Problem/Motivation
For being able to properly migrate menu links (without depending on every content entities' migration), we should be able to create stub menu links.
Right now, this is blocked by the Route migrateprocess plugin, because it assumes that the $options variable it populates form the input value array is an array.
Proposed resolution
Before merging with $route['options], check whether the local $options variable is an array or not.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | interdiff_6-9.txt | 2.48 KB | raman.b |
| #9 | 3156083-9.patch | 8.8 KB | raman.b |
| #9 | 3156083-9-test-only.patch | 8.1 KB | raman.b |
| #6 | interdiff_2-6.txt | 1.04 KB | deepak goyal |
| #6 | 3156083-6.patch | 8.72 KB | deepak goyal |
Issue fork drupal-3156083
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
huzookaComment #3
huzookaComment #4
huzookaComment #5
wim leers🤓
PAth→Path🤓 "set up the system.site" does not really make sense I think. It should either be "set up the system.site config" or "configure a front page".
👏 for using meaningful labels for test cases of a data provider.
🙈 … but that means the comment is unnecessary — let's remove it!
optionsto not be an array? A failing test-only patch would prove me wrong 🤓Comment #6
deepak goyal commentedHI @Wim Leers
Updated patch please review.
Comment #8
mikelutz#6 only pulled out the comments specifically mentioned by @wimleer in #5, but there are several other similar comments among those test cases which should also be removed.
Comment #9
raman.b commentedAddressed remaining pointers from #5
Comment #12
quietone commentedReviewing this and I wish there was a patch with just the new tests that did not include the changes to the array keys. There was just a lot of noise to deal with. I do prefer the string array keys but it was too many changes at one for me.
Anyway, the patch is fine, testing for an array before using a variable as an array is sensible. And the test covers the use case.
Comment #13
alexpottHere we set $options to a string. It feels odd to ignore this data. In the issue summary we say we need this stubbing. What is
$route['options']in this case - is it NULL? Because if so I think the fix should be something likeor maybe the issue is with
if $value is ['some_path'] ... then $options is going to be NULL.
Maybe the better fix would be
Comment #14
quietone commentedSetting to NW to address the questions in #13
Comment #15
quietone commentedThe route process plugin is not specific to Drupal 7 sources, removing tag.
Comment #23
fjgarlin commentedPatch was no longer applying to 11.x so I converted it into an MR with a really small change for it to apply.
Feedback from #13 still needs addressing.