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.
The token [entity_legal_document:url] used in the Acceptance Label field on the /admin/structure/legal/manage/terms_conditions/manage/xxxx page doesn't exist.
This works if [entity_legal_document:published-version:url], it seemed the best choice to use as I couldn't think of a real case where it wouldn't be the right document to link to. Patch to follow shortly.
Comment | File | Size | Author |
---|---|---|---|
#11 | url_token_doesn_t_exist-2789031-11.patch | 1.74 KB | svendecabooter |
#2 | url-token-doesnt-exist-2789031-2.patch | 704 bytes | AndyD328 |
Comments
Comment #2
AndyD328Comment #3
AndyD328Comment #9
Christopher Riley CreditAttribution: Christopher Riley commentedThis patch fixed part of my issue with setting a url alias however its not passing tests and it is not giving the correct URL when you select checkbox on signup form. For example I have mine at /about/privacy but it instead shows: http://staging.website.com/user/url] as the link.
Can we do something officially about this please?
Thanks in advance
Comment #10
codesidekick CreditAttribution: codesidekick commentedAssigning to Alex as I'm on a Drupal holiday for the time being.
Comment #11
svendecabooterThe patch in #2 seems to work, but does not return the path alias that is set for the legal document.
Attached is a patch that provides token logic for the originally-set [entity_legal_document:url] token.
It sets the Url correctly in the acceptance label, and uses the path alias if one is set.
Comment #13
svendecabooterRetested failing tests, and now everything is green.
Comment #14
tormiRTBC
Comment #15
jcandan CreditAttribution: jcandan as a volunteer commentedThis is still not quite right, and given this is marked RTBC I am unsure if a new ticket is needed.
[entity_legal_document:published-version:url]
links to the revision, not the published content itself. Note, this page displays the breadcrumb of the parent, published content.Two possible improvements: either
[entity_legal_document:url]
be created to point to the published content, or[entity_legal_document:published-version:url]
be made to point to the published content, and not the revision.Comment #16
neerajsinghLet us have a follow up issue to work on #15.
Comment #18
neerajsinghcommitted the patch to 8.x-2.x branch, also a follow up issue for #15 created at #2956032: URL token .