After a recent SQL update, the CMS page links are now giving an Error 404 - Page Not Found.
In the CMS page editor, all pages are set to All Store Views and Enabled. When I click the Preview button, I can view the page successfully but it is adding the store view code at the end of the URL key (i.e. website.com/index.php/store-locator/?___store=storeview1). On the live site though, when I click the same page it navigates to the URL key without the store code and I get a Page Not Found (i.e. website.com/index.php/store-locator).
I've tried adjusting the store view settings, but any recommendations on how I can isolate the issue?
What was the SQL update that recently happened?
Is store-locator a CMS page or provided with a third party extension?
Are you viewing from storeview1 on the frontend? The preview functionality isn't anything special. It's more of a "view" link with a particular store view selected.
The web host upgraded from MySQL 5.0 to MySQL 5.6 and from PHP 5.2 to 5.4, and that's when the trouble started. The store-locator is a CMS page, along with four other CMS pages that produce the same error.
I wasn't viewing that store view from the front end, but I think that's where the issue might be. I'm just realizing now that the front end is trying to navigate directly to the CMS page key and not using the index.php.
For example, if I omit the store view code and just leave 'website.com/index.php/url-key', the page will resolve. The front end links however are all going to 'website.com/url-key'. So is this an issue with the index.php file maybe?
Hmm, upgrading PHP and MySQL shouldn't have caused this issue but if that's what's changed there may be an incompatibility that you're hitting.
Not hitting the index.php suggests that there's something wrong with the web server configuration and/or .htaccess which means that requests aren't being routed through the index.php. Is that something that you can check.
Is the 404 page one that's presented by Magento or by the webserver? If it's Magento, it means that it is still going through index.php.