Closed (cannot reproduce)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user interface text
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
18 May 2012 at 09:21 UTC
Updated:
17 Jan 2015 at 17:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
davidwhthomas commentedThis text update to the label can be done in path_admin_form
http://api.drupal.org/api/drupal/modules%21path%21path.admin.inc/functio...
DT
Comment #2
webflo commentedIts not a i18n problem. This a core bug. I made two screenshots to illustrate the issue.
Comment #3
webflo commentedTagging.
Comment #4
webflo commentedTagging.
Comment #5
devin carlson commentedMight as well make the use of a trailing slash on field prefixes which display a URL consistent!
Comment #6
devin carlson commentedThis looks like a good novice issue (check if the old patch still applies, check if it fixed all occurrences of fields with use a URL prefix, reroll or update as necessary).
Comment #7
JulienD commentedAdding a trailing slash on field prefixes solve the problem for urls having a language code but not for the default url because you will display a double trailing slash.
The problem come from the url() function that can return an url with a trailing slash at the end or not.
Comment #8
JulienD commentedTo solve the problem I did a preg_replace on the generated url to enforce a trailing slash at the end of it. I found that solution in the trailing_slash module.
I rerolled your patch to apply that solution.
I not really convinced by the fast of creating a $url variable to store that information but that reduce the number of url() calls and preg_replace iteration. Let me know if you've got a better idea !
How to test :
- Requirements:
1) Activate the language module
2) Add a new language
- Test the default url :
Go to example.com/admin/config/search/path/add (replace example.com by your website url)
The url displayed should be http://example.com/
- Test the url with a language code :
Go to example.com/[LANGUAGE_CODE]/admin/config/search/path/add
The url displayed should be http://example.com/[LANGUAGE_CODE]/
Comment #9
JulienD commented$path_prefix seems to be a better naming than $url.
Also patched the same problem on Views :
Add a new views, and create a page display : http://example.com/[LANGUAGE_CODE]/admin/structure/views/add

Edit your views and change the page path

Comment #10
enhdless commentedPatch is in need of rerolling.
Comment #11
enhdless commentedComment #12
ivanstegic commentedAssigning to myself as part of Global Sprint Weekend.
Comment #13
ivanstegic commentedRerolled the patch.
Comment #14
webflo commentedComment #15
ivanstegic commentedSince this needs to be backported, here's a patch for D7. The steps are a little different to recreate than in D8:
This patch addresses the issue in D7 and will cause the auto test to fail for the patch.
Comment #17
ivanstegic commentedThe last submitted patch failed because it is for the D7 branch, so I'm switching this to Needs Review. Please look at #13 for the D8 Core Patch
Comment #18
greggillingham commentedReviewd #13 and confirmed /[LANGUAGE_CODE]/admin/config/search/path/add
Result: shows trailing slash
Tested for trailing slash on views as per #9 but with patch from #13: /[LANGUAGE_CODE]/admin/structure/views/add
Result: does not show trailing slash
Comment #19
les limThe testbot tests against the core version indicated in the issue status. You can let the testbot know to skip a particular patch file by putting "do-not-test" in the patch filename. That's documented here: https://drupal.org/node/332678
There's extra whitespace on the first blank line.
There should be a comment describing the intention of that line. That's not a particularly readable regex.
And actually, if we're just making sure there's a slash at the end, do we really need a preg_replace()?
Comment #20
ivanstegic commentedI think I agree, Les. I don't see a reason why we can't just check for the slash and then put it there if it isn't. Anyone else see a problem with this?
Comment #21
visabhishek commentedHi,
I have created a patch based on #19.
Comment #22
visabhishek commentedHi,
Alter the comment description. (// Ensure that URL prefix ends with a slash.)
Comment #23
chakrapani commentedsetting to needs review so that test bot can pickup..
Comment #24
valthebaldPatch works and applies fine, yet I could not reproduce the issue with the latest HEAD (fixed by earlier commit?)
Comment #25
valthebaldComment #26
alimac commentedMinor tag cleanup - please ignore.