• We try to adhere to fairly common defaults. We have one page named “Shop” that is the selected default shop page for WooCommerce. We have fairly standard Permalink settings, using the Post name for structure, “shop” defined as the Product category base, and “product-tag” as the Product tag base. We have several pages that include a paragraph or two about a specific category of product, then have the corresponding WC product category block directly beneath. These pages are set as children to the main Shop page, and manually inserted in our site’s main menu.

    This structure seemed to work well enough. Recently though, it was discovered that clicking on a link to one of these pages instead goes to our WP installation’s not found (404) page instead. In the backend editor, I’m able to load the page fine in WPBakery. But if I try to transfer to the frontend editor, I see the same not found error, and WPBakery has an additional popup error stating “This page can not be edited with WPBakery since it is missing a WordPress default content area” (perhaps because the page was not loaded in the first place.)

    I’ve now cloned the site to do additional testing. I’ve deactivated all plugins except WooCommerce, and also switched to one of WP’s default themes. The error still happens. I’ve tried creating new, blank pages and setting them as children underneath the Shop page – and those are considered as “not found” either. Some pages that were already children under the Shop page continue to work without error.

    It seems this was a recent change as we don’t recall seeing this problem before. Can anyone offer some theories as to what the problem is?

    WordPress: 7.1.3
    WooCommerce: 11.2.1

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @funcdesign. Since this also happens with WooCommerce alone and a default theme, I’d test URL routing before changing WPBakery.

    The shared ‘shop’ path is worth isolating: your normal child pages use /shop/…, while you have also assigned ‘shop’ as the product-category base. That is a possible overlap, not a confirmed diagnosis.

    On the clone:

    1. Save Settings > Permalinks once without changing anything, then retest one failing child page.
    2. If it still fails, change only the Product category base from ‘shop’ to ‘product-category’, save, and test the same child-page URL again. Leave the page’s parent and slug unchanged.

    If the second test changes the result, that gives us a useful lead. Don’t copy that URL change to the live site yet: changing category URLs can require redirects for existing links.

    WooCommerce’s permalink guide explains the separate bases and rewrite-rule refresh: https://woocommerce.com/document/permalinks/

    What is selected under Product permalinks, and can you share the path of one working child page and one failing one? The WPBakery message alone doesn’t establish a missing theme content area when the request is already returning a 404.

    Adam

    The Shop page slug and the product category base are both shop, so /shop/child-page/ can match either a child page or a product category. When WooCommerce matches it as a category and no category has that slug, you get a 404.

    WooCommerce works around this in wc_fix_rewrite_rules(). When your product permalink base starts with the shop page slug, it adds a rewrite rule for each existing child page of Shop. The catch is that WordPress stores rewrite rules and only rebuilds them on a flush. Child pages created after the last flush get no rule, so the category rule catches them and they 404. Pages that existed at the last flush keep working. That matches your symptoms, and it’s why switching themes or turning off plugins changed nothing.

    Steps to try:

    1. Flush the rules: go to Settings > Permalinks and click Save Changes without changing anything. The failing child pages should start working. You’ll need to do this again whenever you add a new child page under Shop.
    2. Check Product permalinks: if it isn’t set to “Shop base” (or a custom base starting with /shop/), WooCommerce never adds the child-page rules. In that case every child page that doesn’t match a real category will 404.
    3. Permanent fix: change the Product category base to something else, such as product-category or category, so it no longer shares a path with your pages. Add 301 redirects from the old /shop/category-name/ URLs. Alternatively, keep the category base and move the info pages out from under Shop (e.g. /collections/...).

    The WPBakery “missing default content area” message is a side effect. The frontend editor loads a 404 template, which has no post content area.

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

You must be logged in to reply to this topic.