• Resolved Andrew Sheard

    (@andrewsheard)


    Since updating to WP5.6 I’ve been having an issue with the Advanced Table block. (Really useful feature of a great plugin, by the way.)

    The problem is this. If an Advanced Table block is part of a reusable block that I add to a post, the presence of the Advanced Table block prevents the reusable block being convertible to regular blocks. I click on ‘Convert to regular blocks’, but nothing happens: the reusable block is just stuck. If the Advanced Table block is removed from the reusable block, the problem doesn’t happen.

    This is the error logged in console:

    Uncaught (in promise) TypeError: e.substr is not a function
        b https://c0.wp.com/c/5.6/wp-includes/js/dist/block-serialization-default-parser.min.js:2
        p https://c0.wp.com/c/5.6/wp-includes/js/dist/block-serialization-default-parser.min.js:2
        s https://c0.wp.com/c/5.6/wp-includes/js/dist/block-serialization-default-parser.min.js:2
        Yr https://c0.wp.com/c/5.6/wp-includes/js/dist/blocks.min.js:3
        CONVERT_BLOCK_TO_STATIC https://c0.wp.com/c/5.6/wp-includes/js/dist/reusable-blocks.min.js:2
        Redux 9
        V https://c0.wp.com/c/5.6/wp-includes/js/dist/data.min.js:2
        F https://c0.wp.com/c/5.6/wp-includes/js/dist/data.min.js:2
        p https://c0.wp.com/c/5.6/wp-includes/js/dist/data.min.js:2
        onClick https://c0.wp.com/c/5.6/wp-includes/js/dist/block-library.min.js:38
        B https://c0.wp.com/c/5.6/wp-includes/js/dist/components.min.js:7
        P https://c0.wp.com/c/5.6/wp-includes/js/dist/components.min.js:7
        React 16
    block-serialization-default-parser.min.js:2:3649
        Redux 6
        V https://c0.wp.com/c/5.6/wp-includes/js/dist/data.min.js:2
        F https://c0.wp.com/c/5.6/wp-includes/js/dist/data.min.js:2
        p https://c0.wp.com/c/5.6/wp-includes/js/dist/data.min.js:2
        onClick https://c0.wp.com/c/5.6/wp-includes/js/dist/block-library.min.js:38
        B https://c0.wp.com/c/5.6/wp-includes/js/dist/components.min.js:7
        P https://c0.wp.com/c/5.6/wp-includes/js/dist/components.min.js:7
        React 12
        bind_applyFunctionN self-hosted:1359
        sc self-hosted:1322
        React 4
        bind_applyFunctionN self-hosted:1359
        Ei self-hosted:1322

    In case it helps, the folks over at GeneratePress are having a similar issue with 5.6: https://generatepress.com/forums/topic/convert-to-regular-block-doesnt-work-in-wp-5-6-or-generateblocks/.

    My issue seems to result from a particular combination of the Advanced Table block in a reusable block in WordPress 5.6. Any help in resolving this would be much appreciated.

    The site I’m having this issue with is a WordPress 5.6 insallation running Twenty Seventeen theme on PHP version 7.3.25. Let me know if you need any more information.

    Best wishes,
    Andrew

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author htmgarcia

    (@htmgarcia)

    Hi @andrewsheard,
    may we have the HTML from Code editor view while you’re editing the post/page?

    Thread Starter Andrew Sheard

    (@andrewsheard)

    Below is the editing screen HTML for a reusable block (‘Test Reusable Block 3’) that contains an Advanced Table block and won’t convert to regular blocks. Sorry it’s not structured: just copied from Firefox HTML editor.

    Is this what you were looking for? Please say if you would like more from the page, or something else.

    <div class="block-library-block__reusable-block-container"><div class="reusable-block-edit-panel"><b class="reusable-block-edit-panel__info">Test Reusable Block 3</b><button type="button" class="components-button reusable-block-edit-panel__button is-secondary">Edit</button></div><div class="components-disabled"><div class="block-editor-writing-flow"><div style="position: fixed;"></div><div><div style="position: fixed;"></div><div><div class="block-editor-block-list__layout is-root-container"><h3 role="group" aria-multiline="true" aria-label="Block: Heading" style="white-space: pre-wrap;" class="block-editor-rich-text__editable block-editor-block-list__block wp-block rich-text" id="block-9d7fa821-2d15-4531-bdba-1132cbe15943" data-block="9d7fa821-2d15-4531-bdba-1132cbe15943" data-type="core/heading" data-title="Heading" contenteditable="false">Advanced Table Block:</h3><div data-align="center" id="block-c250755c-774f-495f-a566-6dc24f5da3a0" role="group" aria-label="Block: Advanced Table" data-block="c250755c-774f-495f-a566-6dc24f5da3a0" data-type="advgb/table" data-title="Advanced Table" class="block-editor-block-list__block"><div class="wp-block" data-align="center"><table class="wp-block-advgb-table"><tbody><tr><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">A</div></td><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">B</div></td><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">C</div></td></tr><tr><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">1</div></td><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">2</div></td><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">3</div></td></tr><tr><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">4</div></td><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">5</div></td><td class=""><div role="textbox" aria-multiline="true" style="white-space: pre-wrap;" class="block-editor-rich-text__editable wp-block-table__cell-content rich-text" contenteditable="false">6</div></td></tr></tbody></table></div></div><div tabindex="-1" class="block-list-appender wp-block"><div data-root-client-id="" class="wp-block block-editor-default-block-appender"><textarea role="button" aria-label="Add block" class="block-editor-default-block-appender__content" readonly="" rows="1" style="overflow: hidden; overflow-wrap: break-word;"></textarea><div class="components-dropdown block-editor-inserter"><button type="button" aria-haspopup="true" aria-expanded="false" class="components-button block-editor-inserter__toggle has-icon" aria-label="Add block"><svg width="24" height="24" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path d="M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"></path></svg></button></div></div></div></div></div></div><div style="position: fixed;"></div><div aria-hidden="true" tabindex="-1" class="block-editor-writing-flow__click-redirect"></div></div></div></div>

    Plugin Author htmgarcia

    (@htmgarcia)

    I mean the HTML from Code editor view. There are some commented lines that are important: https://ibb.co/J7JDZbF

    As suggestion about the issue, please try doing click on the edit button but don’t save. Then try o convert to regular blocks.

    Thread Starter Andrew Sheard

    (@andrewsheard)

    Ah, OK. This is all there is:

    
    <!-- wp:block {"ref":11591} /-->
    

    This is pretty much what I see for a reusable block that will convert, except that the ref is different of course.

    I’ve tried what you suggest. If I click on the Edit button, then click on Convert to regular blocks, it doesn’t convert. In fact, nothing happens, except that I get stuck and eventually have to press Save.

    Plugin Author htmgarcia

    (@htmgarcia)

    Please edit the reusable block and share its HTML.

    Plugin Author htmgarcia

    (@htmgarcia)

    To reach the reusable blocks page to edit them, go to [yoursite.com]/wp-admin/edit.php?post_type=wp_block

    Thread Starter Andrew Sheard

    (@andrewsheard)

    Reusable block HTML:

    <!-- wp:heading {"level":3} -->
    <h3>Advanced Table Block:</h3>
    <!-- /wp:heading -->
    
    <!-- wp:advgb/table {"changed":true,"align":"center"} -->
    <table class="wp-block-advgb-table aligncenter advgb-table-frontend"><tbody><tr><td>A</td><td>B</td><td>C</td></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></tbody></table>
    <!-- /wp:advgb/table -->
    Plugin Author htmgarcia

    (@htmgarcia)

    Thanks! I was able to reproduce the issue.

    It seems an issue in WordPress itself due has been reported in other sites, including in the “Fixing WordPress” forum: https://www.ads-software.com/support/topic/convert-to-regular-block-no-longer-working-wp-5-6-gutenburg/

    While we have more information on this issue, as temporary solution you may consider copy/pasting the code from code editor view from the reusable block to your page/post.

    Thread Starter Andrew Sheard

    (@andrewsheard)

    Glad you can see it too!

    The odd thing is that it is only the presence of certain blocks in the reusable block that causes the problem. Your Advanced Button block, for example, is fine.

    Yes, copy and paste from the reusable block is a good workaround, even in the viual editor view.

    Thanks for your help. Look forward to any further info as and when.

    Plugin Author Steve Burge

    (@stevejburge)

    You’re welcome, @andrewsheard. Thanks for using PublishPress Blocks.

    Please consider leaving a positive review: https://www.ads-software.com/support/plugin/advanced-gutenberg/reviews/. They really help to keep plugin going.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Advanced Table Compatibility Issue with WP5.6’ is closed to new replies.