Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
As the title says
<link rel="shortlink" href="/heresomecleanurl" />
Comment | File | Size | Author |
---|---|---|---|
#6 | 2087043-shortlink-no-alias-6-test-only.patch | 2.61 KB | longwave |
#6 | 2087043-shortlink-no-alias-6.patch | 3.51 KB | longwave |
#5 | 2087043-shortlink-no-alias-test-only.patch | 1.04 KB | longwave |
#5 | 2087043-shortlink-no-alias.patch | 1.95 KB | longwave |
Comments
Comment #1
DamienMcKennaIt does already, e.g. on a clean install it outputs the following for the fourth node:
<link rel="shortlink" href="/node/4" />
If you're not seeing this then you've got a module installed that's changing it.
Comment #2
eule CreditAttribution: eule commentedi have clean install
Comment #3
eule CreditAttribution: eule commentedi check again my site. i have 3 nodes on it every node has cleanurl in the shortlink tag
i have for D8 not a Module installed ..sry ..just a clean installation
Comment #4
longwaveBug confirmed. The code in question is in node_page_view():
According to the documentation, url() is supposed to accept 'alias' => TRUE to assume the path is already aliased. In this case $uri['path'] is 'node/1', but the return value is still aliased, so this 'alias' option does not seem to be working.
Comment #5
longwaveThe PathProcessorAlias class always aliases the path, ignoring the 'alias' option when set. The attached patch fixes this, including tests for both the canonical and shortlink URLs.
This should also fix #2017087: Term shortlink link relation is broken
Comment #6
longwaveAdded more tests to prove #2017087: Term shortlink link relation is broken was also broken and is now fixed.
Comment #7
eule CreditAttribution: eule commentedhi, this is not fixed for now..i try the latest dev. shortlink has cleanurls
Comment #8
longwaveThis is not yet fixed in -dev. You need to apply the green patch from comment #6 or the similar patch from #2096135: PathProcessorAlias ignore 'alias' => TRUE
Comment #9
-enzo- CreditAttribution: -enzo- commentedComment #10
eule CreditAttribution: eule commentedSeptember 11 -> dawehner on September 23 .-)
@longwave thanks for your fixes and help!