• Resolved ig_communitysites

    (@ig_communitysites)


    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]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Ian!

    This is Daria from Ecwid by Lightspeed Customer Care team. I’ll gladly help you!

    I am sorry that you faced this issue. As I understand, you created the “golden-ball-ground-floor-basement-plan-c1970” slug for a page and this links format matches the Ecwid links format like bla-bla-c123. This is the reason why these links reflect the 404 error.

    The Ecwid plugin adds URL processing rules only for the pages where the Ecwid storefront is added, so I assume you added Ecwid to this page(s). We have plans to get rid of these slugs, e.g. https://kingscliffeheritage.org/shop/Kings-Cliffe-In-The-Picture-Book-p679322847 (remove p679322847 part) and I’ve added your account to the feature wait list. I’ll let you know via email directly when it is released.

    Meantime, the solution is to remove the “c” letter from your custom WP links (-c1970). Can you try editing them and using alike formats instead: -1970or -1970-year ?

    Let me know if it helps!

    Hi!

    We’re closing this thread since we haven’t received any reply. If you have any further questions or need assistance, feel free to start a new thread or contact us via email at [email protected].

    We’re here to help!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘404 errors caused by Ecwid URL processing’ is closed to new replies.