Pretty URLs following upgrade to v9

I have tried looking through Pretty URL posts in the forum but cannot find anything like the issue I am experiencing. I have recently upgraded a v8.5.4 website to v9.4.8 and the Pretty URLs setting will not save.

I see the green check mark next to the option but whenever I tick the form field and it says it has updated the form field is cleared. The site will display pages without index.php no problem however, with this option persistently cleared, all autonav and page list blocks include the index.php in the links.

The server is running php 8.5.3 on Apache 2.4.66. I have tried allowing concretecms to manage the server settings in the .htaccess and also disabling the .htaccess and hard coding into the server config but the result is the same. Has anyone else experienced this same issue? It does make me wonder what other issues I may stumble across following the upgrade.

Any suggestions on how to remedy this would be greatly appreciated.

v9.4.8 is not fully php8.5 compatible. php8.5 support is coming with v9.5.0, currently at RC2, not production ready. That isn’t necessarily your problem but will result in problems.

You could try reconfiguring your server for php 8.4.

Thank you for responding - that would certainly make sense.

I had been tweaking this morning and managed to get the setting to persist by using the bootstrap/app.php to absolutely define the settings.

$config = $app->make('config');

$config->set('concrete.seo.url_rewriting', true);
$config->set('concrete.seo.url_rewriting_all', true);
$config->set('concrete.seo.index_rewrite', true);
$config->set('concrete.seo.trailing_slash', true);

$app->bind('concrete/urls', function() use ($app) {
    return $app->make(\Concrete\Core\Url\Resolver\UrlResolver::class);
});

With the likelihood of php 8.5 causing further issues I suspect rolling back to 8.4 for the timebeing as you suggest would be the more sensible approach!

Thanks for your help.

We have five live site running v9.4.8 and PHP 8.5.4 with no issues. That being said we are using ‘LiteSpeed’ version 6.3.5 and not ‘Apache’ servers.

Thanks Steven, that is interesting - I will have to look into LiteSpeed as an alternative. I have rolled back to 8.4 for now just to prevent any potential future headaches.

The “Pretty URL” configuration key is stored in plain PHP files with something like this:

<?php

return [
    // ...
    'seo' => [
        // ...
        'url_rewriting' => true,
    ],
    // ...
];

When you configure the pretty URLs via the dashboard, that settings is stored in the file application/config/generated_overrides/concrete.php.

Anyway, that setting can be overwritten by the file application/config/concrete.php.

So, the first thing I’d check is if you have the application/config/concrete.php file, and if it contains the url_rewriting key (if so, I’d remove it from that file, so that you can actually control its value from the dashboard).

Thanks mlocati.

The ‘url-rewriting’ => true line was being written to the generated_overrides/concrete.php file as expected. However, the setting itself did not remain checked in the dashboard and the autonav continued to generate links including the index.php in the urls.

I also added the line to the config/site.php file to try to get this to work but with the same result unfortunately.

IIRC The file should be config/concrete.php, not config/site.php