Problem/Motivation
Follow-up from #2669978: Migrate D7 Menu Links. The entity URI checking added there relies on the URL structure, which doesn't guarantee an actual entity is accessible via the URI.
Proposed resolution
Adopt a similar approach to the D6 migration.
Remaining tasks
Check and commit
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2822881-4.patch | 7.74 KB | jofitz |
| #4 | interdiff_2-4.txt | 1.41 KB | jofitz |
Comments
Comment #2
jofitzHaving reviewed the changes to the D6 equivalent, LinkUri, it seems there is a lot of overlap and the same process plugin can now be used for both (with minimal tweaks).
Comment #4
jofitzAdd a mock node so that the expected entity uri can be generated.
Comment #5
tstoecklerMissed that detail in the initial D7 patch. I think we should rather use
route:<front>in that case, (and skip theinternal:stuff in that case. That should be a tad more performant when loading that actual link later.Comment #7
jofitz@tstoeckler Can you explain what you mean, please? How is
route:<front>relevant in this situation?Comment #8
jofitzSetting back to "Needs review" - appears to have been a test-bot glitch.
Comment #9
mikeryanComment #10
tstoecklerSo, what we end up saving as the link URI matters for the performance of rendering the actual links later in the Drupal site.
internal:is the slowest option, but it is used as the fallback as it always work.That is why we do that dance to try to convert them into
entity:URIs as that will make the links much faster to load later on.And similarly using
route:<front>is more performant thaninternal:/(or whatever) so we should convert that, as well.Does that make more sense?
Comment #11
tstoecklerComment #12
jofitzThanks, @tstoeckler, that does make sense, but the UI does not handle
route:<front>elegantly - it displays the entire string. This goes against the associated text that says simply use<front>(which then gets converted tointernal:/).I suggest committing this "as is" and creating a separate ticket to associate
route:<front>with<front>then coming back to change this.Comment #13
tstoecklerMhhh ... interesting. Yeah, that's fair, I will open a follow-up.
Comment #14
jofitz@tstoeckler so would you be happy to set this to RTBC?
Comment #15
tstoeckler@mikeryan assigned this to himself 20hours ago, so not sure if he wants to do any improvements or follow-ups, so would like confirmation from him first. But for me this looks RTBC.
Comment #16
tstoecklerOpened #2832382: Try to use route URI scheme in link migration for <front> (and possibly others) for #12 / #13.
Comment #17
mikeryanYep, assigned to myself to review then there was a flurry of activity, so I waited for it to die down.
I'm not particularly conversant with routing, so I defer to @tstoeckler there. The purely migration side looks good to me - I hesitated on seeing a test removed and not replaced, but I see that this test becomes redundant with LinkUriTest, so good to go...
Thanks!
Comment #18
catchCommitted/pushed to 8.3.x and cherry-picked to 8.2.x. Thanks!
Comment #21
heddnThis should probably be related to #2761389: Migrate process plugin internal_uri and d7_internal_uri changed to link_uri and the CR updated.