• I discovered a bug when using the default Query Loop Block is used as a Reusable Block inside of Max Mega Menu.

    The Query Loop block shows a list of custom posts types and default post types inside of a Mega Menu panel just fine. However, the rest of the following blocks on the page disappear. There is no outputted HTML for the rest of the page content, just an empty container wrapper.

    This problem was encountered in Astra Pro and persisted between themes.

    I changed the Query Loop Block to the GenerateBlocks Query Loop block and fixed the issue. Not sure if this in issue with the core Query Loop block or the way MMM enqueues blocks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Raymond,

    How are you including blocks within the sub menu?

    It sounds like the query loop block is not properly resetting the query after it has done whatever it needs to do.

    Regards,
    Tom

    Thread Starter Raymond

    (@crisaba)

    Hi Tom,

    I am creating a Reusable Block which contains the Query Loop Block.

    I’m then including that block using the “Reusable Block (MMM)” selection from the Grid View of the MMM Editor. I’m not able to upload a screenshot due to an error with the Gutenberg editor that says “File Uploading is disabled…”. Though I hope this answers the question you had.

    • This reply was modified 1 year, 10 months ago by Raymond.
    Thread Starter Raymond

    (@crisaba)

    I’ve isolated the issue further. The problem seems to be caused by the Featured Image Post core block rather than the entire Query Block.

    Plugin Author megamenu

    (@megamenu)

    Hi Raymond,

    Thanks. I’ve done some testing here and I can’t get the core Post Loop block to display anything within a sub menu – it’s just empty (with or without a features image). Other blocks work as expected. Our widget simply calls this one line to generate the block output:

    echo?do_blocks(?get_post_field(?'post_content',?$instance['block']?)?);

    .. so I am not sure what the problem is right now. I would suggest continuing to use the Generate Press option for the time being.

    I also tried with the “Reusable blocks extended” plugin and see the same issue – the output of the widget/loop is empty.

    Regards,
    Tom

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using a Query Loop Block in the Mega Menu Breaks Content’ is closed to new replies.