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.
When trying to add a menu_link, pointing to an external website, to a menu in Drupal the documentation tells you to use link_path where it has to be url.
I'll provide a small patch to update menu.api.php
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff_2452995_9-11.txt | 816 bytes | JacobSanford |
#11 | link_path_to_url-2452995-11.patch | 1003 bytes | JacobSanford |
#9 | interdiff_2452995_7-9.txt | 714 bytes | JacobSanford |
#9 | link_path_to_url-2452995-9.patch | 880 bytes | JacobSanford |
#7 | link_path_to_url-2452995-7.patch | 872 bytes | ashutoshsngh |
Comments
Comment #1
Jeroen CreditAttribution: Jeroen at Wunder commentedComment #2
Jeroen CreditAttribution: Jeroen at Wunder commentedComment #3
dawehnerThank you for fixing this particular problem!!
Comment #4
webchickNice catch. Committed and pushed to 8.0.x. Thanks!
Comment #6
jhodgdonThis needs a quick follow-up. "url" is incorrect as a word. Should be "URL".
Both of the changed lines need this fix.
Comment #7
ashutoshsngh CreditAttribution: ashutoshsngh at Srijan | A Material+ Company commentedChanged "url" to "URL" as mentioned in #6
Comment #8
jhodgdonOh, my bad. So ... this text is confusing, because it is referring to array elements in text.
It should say something like "Either the route_name or url element must be provided".
Comment #9
JacobSanfordChanges as requested in #8
Comment #10
jhodgdonOK, good. Maybe here:
it should say "... use this element instead of providing route_name"?
Comment #11
JacobSanfordThanks for the review!
Enclosed are new changes as recommended in #10 and interdiff from #9.
Comment #12
jhodgdonLooks good now, thanks!
Comment #15
JacobSanfordPatch tests clean again, setting to RTBTC.
Comment #16
alexpottCommitted 9a668ad and pushed to 8.0.x. Thanks!