Add a trailing slash to the path form element in the redirect source widget to make it more clear that a URL redirect should not contain a leading slash.

Comments

JeroenT created an issue. See original summary.

jeroent’s picture

Status: Active » Needs review
StatusFileSize
new836 bytes
jeroent’s picture

StatusFileSize
new4.87 KB
new4.81 KB

Before:

Before

After:

After

jeroent’s picture

berdir’s picture

Status: Needs review » Needs work

The problem is that this trailing / *is* there on a non-multilingual site, so this would result in two traiing slashes and we need to make sure to prevent that.

berdir’s picture

That said, the language suffix is actually confusing too, because it's the language field that defines the prefix, so maybe we should just cut that off?

jeroent’s picture

StatusFileSize
new815 bytes

You're right, makes sense to cut off the language prefix.

jeroent’s picture

Status: Needs work » Needs review
mizutaniDC’s picture

StatusFileSize
new1.19 KB

This is a patch that supports multilingual sites and has exactly one trailing slash.

s3b0un3t’s picture

The patch of @mizutaniDC (comment # 9) works perfectly for a multilingual site with path prefix.

berdir’s picture

I'm not sure about #9, #7 makes more sense to me, to never show the language prefix. Having the language prefix is misleading as you can then combine it with another language or language agnostic. Wondering if we should have a test for that.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

RTBC for #7 - works perfectly for me and is language neutral at this page, which also makes more sense as the language selection is a setting at the bottom.

anybody’s picture

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Committed #7.

  • Berdir committed 575b07d2 on 8.x-1.x authored by JeroenT
    Issue #3101563 by JeroenT, mizutaniDC: Add a trailing slash to the path...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.