Upgraded from C5 8.5.1 to 8.5.5, URLs are now case sensitive

Hi all,

As the topic says, I upgraded several systems from 8.5.1 to 8.5.5 last week and the one issue we’ve discovered so far is that the site URLs are no longer case insensitive like on our old versions. Anyone else experiencing this issue and/or know how to solve it?

Other systems on the same servers are handling URLs properly, so I know its not a server issue, and the C5 issue occurred on all three separate servers that I upgraded to 8.5.5 last week, so I know its definitively a C5 issue.

By default, c5 likes to be case sensitive. Linux servers are by default case sensitive.

If on a case insensitive platform such as Windows, it is usually best to configure MySQL to be case sensitive. That makes it much easier to move a site onto a Linux server for production.

With that in mind, perhaps you also updated aspects of your server environment and lost some MySQL settings or even changed from a Windows server to Linux server as part of your updates.

There are some addons in the marketplace that can help you fix case sensitive issues. Try:

Thanks for the reply. I upgraded from 8.5.1 to 8.5.5 on the same server, using the manual upgrade method (i.e. replacing the “concrete” folder and running the manual upgrade script).

Unless the upgrade script changed some database setting, mysql and apache (and .htaccess) settings should all be the exact same thing.

I got further proof a few hours ago that it definitely was the upgrade rather than an endemic problem I hadn’t noticed until now, as our link monitoring software (run weekly) just came back with hundreds of 404 hits, all of the with links using upper case letters.

I can code a kludge to force all the urls to lower case, but I’d really would rather fix the actual source of the problem.

Also, one of the sites I upgraded had very few plugins and no code overrides, and its having the same issue. Hence why I don’t think its being cause be a code override somewhere either.

@Doki
The upgrade from 8.5.1 to 8.5.5 does change the database. It likely converted your character set to UTF8MB4. Check your connection, database, and tables for the collation. If the colation doesn’t have _ci at the end, then it’s going to be case sensitive (the ci means case insensitive. I suspect the PagePaths table collation might not be case insensitive.

My database collation is set to utf8mb4_general_ci and all my table collations are set to utf8mb4_unicode_ci. In databases.php, I have the following lines:

        'character_set' => 'utf8mb4',
        'collation' => 'utf8mb4_unicode_ci',

Do you happen to see something in the above that would cause the issue?

@Doki I messed around with collations and I think JohntheFish is right in that by default the paths should have been case sensitive, so I’m not sure what you were doing to make them case insensitive. Is there any custom code or package you are using that would provide that? Or maybe something in your server config which is transforming and/or normalizing the requests?

I’m having this problem as well on multiple sites running C5 8.5.5
fresh install of C5 8.5.5 with demo data has the problem as well.
I’m checking at what version of C5 this became a problem.
[edit]
on C5 8.5.4 example.com/portfolio/project-title and example.com/portfolio/project-TITLE displays the same page.

on C5 8.5.5 and C5 8.5.6 example.com/portfolio/project-title displays the page and example.com/portfolio/project-TITLE display’s a 404 page
[/edit]

the problem exists also in the C5 9.0.0RC3

Would love to hear a solution for this problem

I think the problem is much simpler as the database collation approaches mentioned above.
The problem is caused by an addtional check in PageController.php that uses strpos() function. I changed it to stripos() that is case insensitive.

2 Likes

That was indeed the culprit