Joomla 4.1 url generated is case sensitive Topic is solved

Need help upgrading your Joomla! website or converting to Joomla! 4.x?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Joomla 4.1 url generated is case sensitive

Post by samlatif » Sat Jun 25, 2022 9:26 am

Hi,
I have upgraded the site to Joomla 4.1 from J3. it was very smooth, however the url generated became case sensitive, this created a huge problem, in j3, it was case-insensitive. I tried manipulate the file .htaccess it does not work. I talked to the host, they said it is a joomla issue. for example the link
https://www.fittotravel.net/london is working while https://www.fittotravel.net/London is not.

any help in this issue?
many thanks

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 15228
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Joomla 4.1 url generated is case sensitive

Post by toivo » Sat Jun 25, 2022 10:28 am

Welcome to the Joomla Forum!

Which operating system does the web server use in each case, Joomla 3 and Joomla 4?
Toivo Talikka, Global Moderator

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sat Jun 25, 2022 11:14 am

the operating system is Linux OS use Fedora one SiteGround for both j3 and j4

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4148
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: Joomla 4.1 url generated is case sensitive

Post by abernyte » Sat Jun 25, 2022 4:04 pm

Did your Joomla 3 site have the apache mod_speling enabled.

Code: Select all

<Directory /var/www/html>
    CheckCaseOnly on
    CheckSpelling on
</Directory>
That does allow URL's with one error in uppercase capitalisation in text after the domain name to resolve. If it is not available to the J4 site it may explain the discrepancy.
The general rule is that all urls are care insensitive in Windows but in Linux it will only allow uppercase in the domain portion..which it ignores. No uppercase after the .org etc.
"Those who expect to reap the blessings of freedom must, like men, undergo the fatigue of supporting it." Thomas Paine

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42107
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla 4.1 url generated is case sensitive

Post by Webdongle » Sat Jun 25, 2022 5:41 pm

All urls are converted to lowercase

Generally Windows is not case sensitive but Linux is. So:
1. site.com/London will be converted to site.com/london
2. when the request site.com/london reaches a windows server it will be directed the folder called London or london.
(in windows you can have a folder called London or london not both. you can also have spaces in a folder name)
but
3. when the request site.com/london reaches a linux server it will look for a folder called london
(in linux you can have a folder called London and a folder called london. you can not have spaces in a folder name).
That's why Joomla url's (in the Alias field of the menu item) does not accept lowercase or spaces.
Joomla would not create a url fittotravel.net/London.

Did you create the site on windows then transfer to the linux server?
How was the folder /London created?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sat Jun 25, 2022 6:12 pm

Webdongle wrote:
Sat Jun 25, 2022 5:41 pm

Did you create the site on windows then transfer to the linux server?
How was the folder /London created?
Dear Webdongle thanks for the comments, the website is originally on linux, however the url /London is created by the authors of the articles, because j3 accepted both urls /London and /london, both leads to the menu item 'london'. when upgrade to j4 the /London url give "404 Page not found"
I hope there is some solution for that.

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sat Jun 25, 2022 6:16 pm

abernyte wrote:
Sat Jun 25, 2022 4:04 pm
Did your Joomla 3 site have the apache mod_speling enabled.
Dear abernyte Thank you for help, however as a beginner, I just added mod_speling to .htaccess, for apache, maybe I need to talk to the host to enable. is ther other things to do in the joomla side?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42107
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla 4.1 url generated is case sensitive

Post by Webdongle » Sat Jun 25, 2022 6:53 pm

samlatif wrote:
Sat Jun 25, 2022 6:12 pm
... however the url /London is created by the authors of the articles, because j3 accepted both urls ...
Joomla (whatever version) does not accept url's it creates them. The url's Joomla creates DO NOT include upper case characters.
A 3rd party Template or extension must have created a folder called /London and a url to it that it fittotravel.net/london
Then (for some reason) the 3rd party Template or extension is now creating the url fittotravel.net/London

Check the folders on your server called /London and edit to /london

What link in your site calls fittotravel.net/London ?

Also please https://forumpostassistant.github.io/docs/ might help locate the extension.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12600
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla 4.1 url generated is case sensitive

Post by brian » Sat Jun 25, 2022 10:59 pm

IT IS A BUG
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42107
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla 4.1 url generated is case sensitive

Post by Webdongle » Sat Jun 25, 2022 11:25 pm

Thanks @brian
Link to the issue tracker please
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12600
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla 4.1 url generated is case sensitive

Post by brian » Sun Jun 26, 2022 6:17 am

not on the tracker. no one has reported it before - that I am aware of
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sun Jun 26, 2022 7:15 am

Joomla (whatever version) does not accept url's it creates them. The url's Joomla creates DO NOT include upper case characters.
Yes, I agree with you, joomla always generate lower case URL. please excuse my ignorance, I haven’t explain the issue correctly,
I mean the authors of articles added links to folder “ london ‘’ using upper case, “index.php/London, in j3 this link leads to folder lonodn,, while in j4 it is not, so the error created artificially, the ideal way is to change all the links in articles manually, however, there are more than 1k articles, I wonder if there is another solution, to make j4 behave like the j3 in this matters.
Last edited by toivo on Sun Jun 26, 2022 8:25 am, edited 1 time in total.
Reason: mod note: fixed quote tag

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12600
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla 4.1 url generated is case sensitive

Post by brian » Sun Jun 26, 2022 7:50 am

I am writing a pull request to permanently address this but in the meantime you can probably create/find an htaccess
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42107
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla 4.1 url generated is case sensitive

Post by Webdongle » Sun Jun 26, 2022 8:50 am

samlatif wrote:
Sun Jun 26, 2022 7:15 am
...
I mean the authors of articles added links to folder “ london ‘’ using upper case, “index.php/London, in j3 this link leads to folder lonodn,, while in j4 it is not, ...
But still type HTTP://FORUM.JOOMLA.ORG and when clicked the url in the browser shows forum.joomla.org
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sun Jun 26, 2022 8:53 am

brian wrote:
Sun Jun 26, 2022 7:50 am
I am writing a pull request to permanently address this but in the meantime you can probably create/find an htaccess
Yes, I will try htaccess.
Many Thanks

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sun Jun 26, 2022 9:04 am

But still type HTTP://FORUM.JOOMLA.ORG and when clicked the url in the browser shows forum.joomla.org
Yes the domain name in upper case still working "HTTPS://WWW.FITTOTRAVEL.NET" pointing to the home page, however when pointing to a folder or a menu item, the upper case does not work. this link 'https://www.fittotravel.net/index.php/London' with London initial capital does not work.
Interestingly, I have another j3 website on the same host with url still case insensitive.
I mean, both "www.ahmadlatif.com/index.php/articles" and "www.ahmadlatif.com/index.php/Articles" working and pointing to the same menu item.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42107
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla 4.1 url generated is case sensitive

Post by Webdongle » Sun Jun 26, 2022 9:08 am

Yep, I see now

@brian
Manually edited file on test site as per your change https://github.com/joomla/joomla-cms/co ... 647f5c1577 thanks.

@samlatif
Try it
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12600
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla 4.1 url generated is case sensitive

Post by brian » Sun Jun 26, 2022 11:51 am

domain names are not case sensitive
urls are case sensitive
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sun Jun 26, 2022 11:53 am

Webdongle wrote:
Sun Jun 26, 2022 9:08 am
Yep, I see now

@brian
Manually edited file on test site as per your change https://github.com/joomla/joomla-cms/co ... 647f5c1577 thanks.

@samlatif
Try it
Great.. working, Many Thanks ;)

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12600
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla 4.1 url generated is case sensitive

Post by brian » Sun Jun 26, 2022 12:12 pm

please go to https://issues.joomla.org/tracker/joomla-cms/38145 and report your tests otherwise this will never be merged and you will lose your manual edit on the next update
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42107
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla 4.1 url generated is case sensitive

Post by Webdongle » Sun Jun 26, 2022 12:31 pm

@brian
Sorry didn't see the Test PR when I looked before.
Done now
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4148
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: Joomla 4.1 url generated is case sensitive

Post by abernyte » Sun Jun 26, 2022 12:40 pm

Second test done
"Those who expect to reap the blessings of freedom must, like men, undergo the fatigue of supporting it." Thomas Paine

samlatif
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Oct 31, 2012 3:14 pm

Re: Joomla 4.1 url generated is case sensitive

Post by samlatif » Sun Jun 26, 2022 1:23 pm

brian wrote:
Sun Jun 26, 2022 12:12 pm
please go to https://issues.joomla.org/tracker/joomla-cms/38145 and report your tests otherwise this will never be merged and you will lose your manual edit on the next update
Sure I will report it. many thanks for the great help.

andrew913
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Tue Apr 05, 2022 11:33 pm

Re: Joomla 4.1 url generated is case sensitive

Post by andrew913 » Wed Oct 05, 2022 10:31 pm

Is this ever going to get fixed? Our community has printed event signs that we've used for years that tell people to go to OurSite.com/Events when we have neighborhood parties, holiday contests, and so on.

Now we have a lot of irritated residents asking why we have the only website they've ever seen with case-sensitive /paths.

I've temporarily added this to the top of my .htaccess file, but it seems like a wildly inefficient solution.

Code: Select all

# If there are caps, set HASCAPS to true and skip next rule
RewriteRule [A-Z] - [E=HASCAPS:TRUE,S=1]

# Skip this entire section if no uppercase letters in requested URL
RewriteRule ![A-Z] - [S=28]

# Replace single occurance of CAP with cap, then process next Rule.
RewriteRule ^([^A]*)A(.*)$ $1a$2
RewriteRule ^([^B]*)B(.*)$ $1b$2
RewriteRule ^([^C]*)C(.*)$ $1c$2
RewriteRule ^([^D]*)D(.*)$ $1d$2
RewriteRule ^([^E]*)E(.*)$ $1e$2
RewriteRule ^([^F]*)F(.*)$ $1f$2
RewriteRule ^([^G]*)G(.*)$ $1g$2
RewriteRule ^([^H]*)H(.*)$ $1h$2
RewriteRule ^([^I]*)I(.*)$ $1i$2
RewriteRule ^([^J]*)J(.*)$ $1j$2
RewriteRule ^([^K]*)K(.*)$ $1k$2
RewriteRule ^([^L]*)L(.*)$ $1l$2
RewriteRule ^([^M]*)M(.*)$ $1m$2
RewriteRule ^([^N]*)N(.*)$ $1n$2
RewriteRule ^([^O]*)O(.*)$ $1o$2
RewriteRule ^([^P]*)P(.*)$ $1p$2
RewriteRule ^([^Q]*)Q(.*)$ $1q$2
RewriteRule ^([^R]*)R(.*)$ $1r$2
RewriteRule ^([^S]*)S(.*)$ $1s$2
RewriteRule ^([^T]*)T(.*)$ $1t$2
RewriteRule ^([^U]*)U(.*)$ $1u$2
RewriteRule ^([^V]*)V(.*)$ $1v$2
RewriteRule ^([^W]*)W(.*)$ $1w$2
RewriteRule ^([^X]*)X(.*)$ $1x$2
RewriteRule ^([^Y]*)Y(.*)$ $1y$2
RewriteRule ^([^Z]*)Z(.*)$ $1z$2

# If there are any uppercase letters, restart at very first RewriteRule in file.
RewriteRule [A-Z] - [N]

RewriteCond %{ENV:HASCAPS} TRUE
RewriteRule ^/?(.*) /$1 [R=301,L]

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 42107
Joined: Sat Apr 05, 2008 9:58 pm

Re: Joomla 4.1 url generated is case sensitive

Post by Webdongle » Thu Oct 06, 2022 12:34 am

@samlatif
https://issues.joomla.org/tracker/joomla-cms/38145 was closed in favour of https://github.com/joomla/joomla-cms/pull/38249
The last post there was 11th July. The experts can not agree if it should be fixed or not. The ones that think it should be fixed can not agree on how it should be.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

andrew913
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Tue Apr 05, 2022 11:33 pm

Re: Joomla 4.1 url generated is case sensitive

Post by andrew913 » Thu Oct 06, 2022 1:49 am

Wow, that was quite a read. Mostly swinging dangly bits at one another as far as I could tell. It continues at https://github.com/joomla/joomla-cms/issues/38257.

I would love the "experts" to show me one instance in the wild of two url's where /london delivers different content than /London.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13061
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Joomla 4.1 url generated is case sensitive

Post by sozzled » Thu Oct 06, 2022 3:35 am

andrew913 wrote:
Thu Oct 06, 2022 1:49 am
I would love the "experts" to show me one instance in the wild of two URLs where /london delivers different content than /London.
Not exactly "in the wild" but I was able to simulate this on a Unix-based server: two URLs, differently cased, different content:

1) https://j3xdemo.enduring.com.au/london
2) https://j3xdemo.enduring.com.au/London
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

gws
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4872
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Joomla 4.1 url generated is case sensitive

Post by gws » Thu Oct 06, 2022 7:15 am

@ sozzled url 2 above returns a ;

We're sorry, but our site requires Javascript to be enabled to run.

You can easily enable Javascript in your browser.
If you would like instructions on how to do this, please click here.

Never seen that error before?

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 13061
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: Joomla 4.1 url generated is case sensitive

Post by sozzled » Thu Oct 06, 2022 7:30 am

:laugh: *hah-hah-hah-hah-hah* It was a demonstration, nothing more than that.

Forget the substance of the content: I was demonstrating that one website, two URLs (same spelling but one with all the letters in lowercase and the other with the first letter in uppercase), can yield different content.

I wrote the HTML that generated the page you've "never seen before". And wouldn't you think that someone like me who's built websites since 1995 might know would know how to enable or disable Javascript in the browser? ;)
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?”
Walking the talk: https://j4xdemo.enduring.com.au
:)

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2451
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Joomla 4.1 url generated is case sensitive

Post by SharkyKZ » Thu Oct 06, 2022 7:43 am

andrew913 wrote:
Thu Oct 06, 2022 1:49 am
Wow, that was quite a read. Mostly swinging dangly bits at one another as far as I could tell. It continues at https://github.com/joomla/joomla-cms/issues/38257.

I would love the "experts" to show me one instance in the wild of two url's where /london delivers different content than /London.
Can's say specifically about "London" but Wikipedia, for example, does use case sensitive URLs. E.g.
https://en.wikipedia.org/wiki/Stack_Overflow
https://en.wikipedia.org/wiki/Stack_overflow

Most modern PHP frameworks use case sensitive URLs out of the box too. Case insensitivity is just a useless arbitrary limitation.


Post Reply

Return to “Migrating and Upgrading to Joomla! 4.x”