Home Forums WoodMart support forum Theme never returns 404 – all invalid URLs serve the front page (200)

Theme never returns 404 – all invalid URLs serve the front page (200)

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #729616

    wsmile83
    Participant

    Hello,

    On our live WooCommerce store no URL ever returns a 404. Every invalid URL returns HTTP 200 and serves the front page content.

    HOW TO REPRODUCE: request any non-existent URL, e.g. /zzz-does-not-exist/

    OBSERVED BEHAVIOUR:
    – HTTP status is 200, not 404
    – No redirect occurs – the address bar keeps the invalid URL
    – The response is the front page: body class is “home page-template-default page page-id-2188”, and the canonical link points to the site root
    – This happens for every URL shape: plain paths, nested paths, /product/…, /category/…, /product-category/…, and also for query-string requests such as /?p=9999999 and /?page_id=9999999
    – Search (/?s=test) works correctly and renders the search template, so the query system is otherwise healthy

    Because WordPress never reaches the 404 state, the theme’s 404.php template is never loaded, and wp_old_slug_redirect() never fires – so we cannot create redirects for changed permalinks.

    We updated from 8.6.0 to 8.6.1 today and the behaviour is unchanged (re-tested immediately after the update).

    ALREADY RULED OUT ON OUR SIDE:
    – .htaccess – read in full, only standard WP Rocket / WordPress / Wordfence blocks. No ErrorDocument, no redirect directives
    – No mu-plugins directory, no child theme
    – WoodMart’s 404.php – inspected, it is the stock template (header, “Nothing Found”, search form, footer). It contains no redirect and is simply never loaded
    – Theme option “Custom 404 page” is empty; Maintenance mode is off
    – Our two custom plugins and all three WPCode snippets – inspected, none touch is_404, the query, or the front page
    – Not caching – identical behaviour while logged in as admin (WP Rocket bypassed)
    – Not a rewrite rule – query-string requests, which bypass rewrites, behave the same

    The interception clearly happens at query level, before template selection.

    ENVIRONMENT: WoodMart 8.6.1, WordPress 7.1.1, WooCommerce 11.1.0, PHP 8.3.33, MariaDB 11.4.13

    Is this a known behaviour, a theme option we have missed, or a filter we can disable?

    Thank you.

Viewing 1 post (of 1 total)