• Resolved billrodgers

    (@billrodgers)


    Greetings!

    Our error log is stuffed full of these and our hosting is blaming this for causing the site to crash with a “too many requests” error. I doubt they are right but would still wish to clean up these duplicated id’s.

    It looks like from your plugin updates a fix has been implemented but it only seems to fix new blocks going forward and doesn’t repair existing blocks with identical ID’s.

    I have a few sites with this problem and would appreciate help fixing existing blocks.

    Thank you,

    Bill

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • George

    (@quantum_leap)

    Hi Bill,

    I checked with our team about this issue. The warning occurs on version 1 blocks when a container block is missing its unique ID. You’ll need to find and replace the problematic block(s).

    To identify which pages have the problem:

    Enable WP_DEBUG to log errors without displaying them to visitors.

    How to enable WP_DEBUG:

    1. Edit your wp-config.php file (in your WordPress root directory)
    2. Find this line: define('WP_DEBUG', false);
    3. Replace it with:

    php

    define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', false);
    define('WP_DEBUG_LOG', true);

    Finding the problem blocks:

    1. After enabling debug logging, browse your site’s pages (visit different pages, posts, etc.)
    2. Monitor the /wp-content/debug.log file – you can view it via FTP/file manager, or use command line: tail -f /path/to/wp-content/debug.log
    3. When you see the uniqueId warning appear in the log, note which page you were viewing at that moment
    4. Once you’ve identified the affected page(s), right-click and “View Page Source” to check the HTML
    5. Look for GenerateBlocks container elements – they should have a unique class like gb-container-abc123def
    6. If a container is missing this unique ID class, that’s your problem block
    7. Edit that page in the block editor and replace the problematic container block

    Important note:

    Turn WP_DEBUG back off when finished – set all values back to false after identifying problem blocks.

    Let me know if you need any clarification on these steps!


    Thread Starter billrodgers

    (@billrodgers)

    Hi George,

    Thank you, I appreciate your reply. I did set up the debug log even before I asked for help here. The message in it is the same as the error log.

    I haven’t had any luck doing as you suggested due to the large amount of traffic on the site. They are promoting a conference with emails and traffic has been huge.

    I was hoping for help more in the line of db query or script that can spider the site to show duplicates.

    Thank you,

    Bill

    George

    (@quantum_leap)

    Hi Bill,

    Since the block data is stored as JSON strings within the post_content column, a standard SQL query is often insufficient (and risky) for accurately identifying specific blocks missing a key within that JSON structure.

    A PHP script that iterates through your posts and parses the blocks is the most reliable method.

    Here is a PHP snippet you can use to scan your site. You can add this using a plugin like Code Snippets or into your theme’s functions.php file (temporarily).

    https://pastebin.com/QZU21YNK

    This code registers a shortcode [gb_find_errors] that you can place on a private page or draft. When you view the page, it will scan your published posts and list any that contain a GenerateBlocks Container block missing the uniqueId attribute.

    How to use this:

    1. Add the code snippet to your site.
    2. Create a new page (you can keep it as a Draft).
    3. Add the Shortcode block and type: [gb_find_errors]
    4. Preview the page.
    5. The script will run and generate a list of links to the specific posts/pages causing the issue.
    6. Open those pages in the editor. WordPress often attempts to “Attempt Block Recovery” automatically, or you can manually select the broken container to force it to regenerate the ID (sometimes making a small change like toggling a setting helps).

    Once you have fixed the blocks, you can remove the snippet.

    I hope this helps you clean up those logs!

    Thread Starter billrodgers

    (@billrodgers)

    Thanks for posting this George. I appreciate your help. All the “php warnings” are gone for Generate Blocks.

    George

    (@quantum_leap)

    That’s great, you are welcome!

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

You must be logged in to reply to this topic.