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.
I'm creating a Feature for a view which defines a page with the url path 'path-in-english'. Using the core path module, I can define a path alias for other languages, for example 'chemin-en-francais' (path in French). However, it is possible to export views in Features, but, as far as I can tell, not URL aliases defined with the core path module. It would be a nice functionality to have!
Comment | File | Size | Author |
---|---|---|---|
#11 | uuid_node_save_path_alias-982818.patch | 812 bytes | andreyjan |
Comments
Comment #1
Grayside CreditAttribution: Grayside commentedThe problem here is that no path alias referring to content, such as nodes, could properly be exported.
Path aliases to paths consistent across all Drupal sites could conceivably be exported.
For now, it would be easier to wrap some logic around path_set_alias() to set up your aliases on hook_install().
Comment #2
alberto56 CreditAttribution: alberto56 commentedThanks for your answer. Good point indeed. path_set_alias() is the path I decided to go with. The question arises, though, about overriding and resetting Features.
Right, and I would add path aliases to views pages as well, as long as the path alias(es) and the views to which they refer co-exist in the same view.
Cheers,
Albert.
Comment #3
RobLoach#1202958: UUIDs for Path/URL Aliases
Comment #4
alberto56 CreditAttribution: alberto56 commentedI mentioned this issue in a blog post about features: http://mediatribe.net/en/node/47
Comment #5
q0rban CreditAttribution: q0rban commentedI don't see a need for UUIDs in order to make this exportable. A path can only have one alias, so in a sense, that path itself is it's own unique identifier, or machine name.
Comment #6
q0rban CreditAttribution: q0rban commentedTo clarify what I mean, I don't think it would be too hard to write features exportables for url aliases without UUIDs:
features['url_alias'][] = "und:user/login"
features['url_alias'][] = "fr:user/login"
Comment #7
hswong3i CreditAttribution: hswong3i commentedSince #1202958: UUIDs for Path/URL Aliases already get fixed shall we review this issue once again?
Comment #8
danithaca CreditAttribution: danithaca commentedAny new update?
Comment #9
halthUpdates?
Comment #10
colan@danithaca & @halth: If there are no new comments, then there are no new updates. Please do not post comments like those above as you're needlessly spamming everyone that is subscribed to the issue. If you'd like to move things along, then either work on developing a patch, or pay someone else to do it. Thanks.
Comment #11
andreyjan CreditAttribution: andreyjan commentedAs a quick solution for exported nodes path aliases can be attached patch.
Comment #12
kenorb CreditAttribution: kenorb commentedComment #13
Anybody#11 works for me. Can we get further feedback? Is someone else using the patch?
Comment #14
petednz CreditAttribution: petednz commenteddoes this overlap with https://www.drupal.org/node/2220837
Comment #15
aubjr_drupal CreditAttribution: aubjr_drupal as a volunteer and commented@petednz, yes - I've combined the patch from #11 with #23 on https://www.drupal.org/project/uuid_features/issues/2220837 to make the following patch: https://www.drupal.org/files/issues/2018-12-21/uuid_node_save_path_alias...
Per @goron from https://www.drupal.org/project/uuid_features/issues/2220837#comment-1271...
"The patch in #23 together with the patch at https://www.drupal.org/node/982818#comment-10040366 seem to provide the solution to exporting nodes successfully with alias (this patch) as well as rebuilding correctly on features revert (other issue's patch). Seems to me they should be combined and consolidated into one issue."
Comment #16
petednz CreditAttribution: petednz commentedthx aubjr_drupal - hopefully someone can progress this - i will see if i can review it some point
Comment #18
das-peter CreditAttribution: das-peter as a volunteer and commentedLooks good to me - used patch from #2220837.
Committed & pushed.