Closed (fixed)
Project:
Redirect
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2019 at 02:58 UTC
Updated:
24 Aug 2024 at 07:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
feng-shui commentedAttached patch does a permission check before the text us printed as a URL.
Comment #3
berdirThanks, there seems to be a syntax error, this also reverts short array syntax.
I'd prefer making two separate complete strings, one a s a link and one not, because properly translating them is hard otherwise.
Comment #4
feng-shui commentedApologies, something went very wrong when copying/pasting re syntax and formatting.
Updated patch attached that has complete strings as requested.
Comment #5
feng-shui commentedComment #7
feng-shui commentedOk, so that patch has extra white space in it.... what the hell is going on with my IDE...
Comment #8
feng-shui commentedOk, let's try without that whitespace for starters.
Comment #9
feng-shui commentedComment #10
quicksketchThanks Feng-Shui for opening this issue. I just ran into this as well.
This patch reworks the messages to be complete sentences, so they can be translated with more context of the words around them. I also don't think we should be even mentioning path aliases if the user does not have access to manage them, so this replaces the string
'It is preferred to create URL aliases for existing paths rather than redirects.'
with
'Creating this redirect may make the path inaccessible.'
Comment #11
berdirHaving that one sentence separated is still a bit of an issue for RTL languages because the second sentence would then be "first" I thnk?
The alternative text looks good, makes sense to not mention aliases then at all.
Comment #12
feng-shui commentedRe-roll of #10 against 1.6.
@Berdir what would you like to see here re the RTL issue?
Comment #13
iancawthorne commentedJust stumbled on this issue on one of our Drupal sites and wondering if this can be progressed and committed?
Comment #16
dpiThe whole message
May not even be correct as it is not programmatically determine if its a "valid path", using language like "likely".
I'd rather not display the message at all if the user cant access the link.
This can be done with $url->access rather than permission checks, which are not enough when custom access control is added on a route.
Comment #17
dpiMy preference is MR !106, though I think proper messaging should be added in the other existing
catchblocks, and the use of HTML and faking messenger is also gross. Out of scope.Comment #20
berdirUnsure what to do about that. Combining multiple translatable strings together is definitely not good, because that will mess with LTR languages. Fine to just go with MR 106, just removing the message seems a bit tricky, but better than showing an inaccessible link I guess.
Comment #22
dpiThanks. Happy with this headline-satisfying change.
The block remains less than ideal, lets tackle other changes in follow ups.