Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Woocommerce 8.4 Page ID Shortcodes breaks the editor

  • Hello,

    Running into an issue with Generate Press and Woocommerce product shortcodes.

    Here is some information.

    When adding a woocommerce product shortcode to a regular page, after saving and reloading the page editor, instead of coming up a page with previous blocks, it is coming up as a new blank “product” page instead of the initial page with shortcode. I say “product” page because the tab that normally would say “Page” now says “Product”, which I have not seen before outside of Woocommerce product section.

    And here is the full, blank “product” page. There are no revisions on this page, presumable because it is a new page.

    If we disable Woocommerce, the page comes up as it initially was and the editor tab says page again.

    A peek inside the console shows no errors, only the following warning.

    A few other note to mention.
    • We looked at this on other sites running Woocommerce, but not using GeneratePress and there was no similar issue.
    • We looked at different versions of woocommerce and generatepress and both of the versions we looked at, woocommerce 8.7 and the latest 8.8.1 both had the same issue.
    • We also tried this on different sites on slightly different server setups.

    Any assistance you could provide would be appreciated, thank you.

  • A few other things to note.
    • This is only noticeable on the backend, there is no issue on the front end and everything on the front end seems to work as intended.
    • On a clean install with just generatepress and woocommerce this still happens. It does not happen with a single product, but when you have more than one.
    • When reverting to a default theme such as twenty-twentyfour, it does not happen.

  • Hi there,

    That’s an unusual issue. I’ve been trying to reproduce this problem on my end, but I haven’t been able to see the ‘Product’ tab in my editor settings; it just shows ‘Page’ as normal.

    You can provide temporary login credentials for your site so that we can take a closer look at what’s going on.

  • Hello, thank for the response. It is strange indeed. I have provided credentials, please let us know if you are able to find anything. At this point we are trying to nail down the cause of the issue and any help you can provide is very appreciated.

  • Private information updated.

  • Hi there,

    it looks like a duplicate slug issue.

    In your Pages you have a page titled Product Test and its slug is test
    And in Products you have product title Text and it too has a slug of test

    You can’t have duplicate slugs or WPs template hierarchy will get confused

  • Thanks for the quick reply, we will check this. Why would twentytwentyfour not have this issue? Seemed as though woocommerce ads /product/ to the product URLs, but is this not taken into account?

    Really appreciate your help with this, thank you.

  • I looked into this and that is actually not accurate. The Product Test page, had a slug of “product-test” and the product had a slug of “test” or /product/test/. So they were not actually the same. To test what you suggest I changed all titles and slugs and yet we are still seeing the same issues. Please have another look and see. Is there something that gets cached in the URLs? I redid saving the permalinks and it is still not working.

  • Ok, the themes functions.php has been edited.
    See here for the original file:

    But your file has the an addition to line 125:

    add_action('init', 'flush_rewrite_rules');

    Which is probably messing with the permalink structure.
    Tru removing that, and removing the custom permalink structure you have set for the woo products

  • Private chat updated.

  • Yes I just added this, add_action(‘init’, ‘flush_rewrite_rules’);, it is removed now. Problem with the custom product permalink is when I click default it reverts back to the “custom” one.Try yourself and see this is a complete test site, go ahead and try.

  • There is something very weird between that install and woocommerce.
    I installed the Twenty21 theme on the site, which is a PHP Theme like GP and it has the excact same issues ie. when you edit a page it opens a product instead.

    Perhaps try re-installing WP and Woocommerce from scratch, as i am at loss as to what woo is doing.
    You may want to consider also increasing the soecs on that server first as it has the basic Litespeed settings which are supper low for any install, let alone a Woo install.

  • Thanks David, what is soecs? You mentioned increasing this, but I am not sure what it is.

    This is actually a fresh install we spun up just to investigate this issue. We have two other sites this is happening on, on different servers, one is in staging the other is live. Seems to be somewhat recent, as it was not happening prior. At least we now know this is most likely not caused by GP, thanks for your help with this.

  • Ah I think you meant specs. Where are you seeing basic lightspeed settings? Looks like it is something with Woocommerce. We reverted back to version 8.3.1 and it works normally, but version 8.4 is broken again. Thanks for your help with this.

  • Known woocommerce issue, closing thread.

  • Specs on the server , i would at least:

    PHP max input variables	4000
    PHP time limit	1200
    PHP memory limit	256M minimum, for Woo, at least 512 if not greater.
    Max input time	600
    Upload max filesize	300M
    PHP post max size	1000M

    Good ol woo – thanks for sharing the bug report!

    JUst to summarise for other uses who may have find this issue:

    Woocommerce 8.4, Page ID shortcodes [product_page id="xxxx"] prevents user from editing Pages, as the page opens a Woocommerce product.

Viewing 16 posts - 1 through 16 (of 18 total)
  • You must be logged in to reply to this topic.