404 errors caused by Ecwid URL processing
-
Hi there,
This is an obscure one, but…
We have an Ecwid shopping cart on a site at kingscliffeheritage.org. We also have an extensive records archive, with a lot of date-based post slugs. Some of those slugs end with a circa year in the format blahblahblah-c1986. For example: https://kingscliffeheritage.org/catalogue_item/golden-ball-ground-floor-basement-plan-c1970 – all of those URLs currently result in a 404 error.
Digging into it all, the problem goes away if I disable the Ecwid plugin. If I go into the code, this function in includes/class-ecwid-seo-links.php appears to be the culprit:
protected static function _get_pb_preg_pattern() {
return '!.-(p|c)([0-9]+)(\/.|\?.*)?$!';
}That doesn’t appear to have any checking of the URL for the shop prefix, so it will match with anything ending in -c1986 or whatever and presumably attempt to convert that into a shop URL, which it won’t then be able to find. If I comment out the return line in that function, the URLs work fine (but I presumably break the shop!).
Any ideas, please? Can we add the shop URL prefix to that Regex pattern, so that it’s more specific? Any help gratefully received.
Many thanks,
ian.
The page I need help with: [log in to see the link]
The topic ‘404 errors caused by Ecwid URL processing’ is closed to new replies.