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 WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Compatibility Issues: Table of Contents Plugins and GenerateBlocks 2.x Headline

  • I’m experiencing an issue with several Table of Contents (TOC) plugins that seem to have lost compatibility with the GenerateBlocks Headline Block since the update to GenerateBlocks 2.x. Before this major update, everything worked as expected.
    I’ve spent some time testing various popular TOC plugins to identify which ones still work and which ones don’t. I wanted to share my findings with you and the community.

    Here is a summary of the plugins I tested:

    Works (with issues):

    Table of Contents Plus (https://de.wordpress.org/plugins/table-of-contents-plus/): It generates a TOC, but the plugin has been abandoned (https://github.com/zedzedzed/table-of-contents-plus). It also causes significant formatting issues with GenerateBlocks Headline Blocks if they contain an icon. This makes it an unsuitable option.

    Works (with a workaround):

    SimpleTOC (https://de.wordpress.org/plugins/simpletoc/): This is my preferred plugin. It stopped working after the GB 2.0 update, was fixed for 2.0.2, but broke again with 2.1. It currently only works if a specific workaround is applied, as discussed in this support thread: https://wordpress.org/support/topic/simpletoc-generateblocks-2-1-again-not-setting-ids/. It would be great if this worked out of the box again.

    Does NOT work:

    Rank Math SEO’s built-in TOC feature: I tested this, and it no longer recognizes headlines created with GenerateBlocks. This seems to be a known issue since GB 2.x, as reported here: https://wordpress.org/support/topic/rankmath-table-of-contents-conflicts-with-generateblocks/.
    All in One SEO (AIOSEO) (https://de.wordpress.org/plugins/all-in-one-seo-pack/): Their TOC block only works with core WordPress headline blocks, not with GenerateBlocks headlines.

    Works perfectly:

    LuckyWP Table of Contents (https://de.wordpress.org/plugins/luckywp-table-of-contents/): This plugin works correctly with GenerateBlocks Headline Blocks.

    Easy Table of Contents (https://de.wordpress.org/plugins/easy-table-of-contents/): This plugin also works perfectly with GenerateBlocks Headline Blocks right out of the box.
    It seems that the way GenerateBlocks 2.x renders headlines or handles their IDs has changed, causing some plugins (like SimpleTOC or Rank Math’s TOC) to fail, while others are still compatible.

    I have two suggestions/requests:

    1. Would it be possible for your team to investigate if a small code adjustment could be made to GenerateBlocks to restore the previous compatibility? This would be especially helpful for plugins like SimpleTOC that many users enjoy.

    2. Alternatively, could you consider publishing a short help-desk article or a blog post that lists TOC plugins officially tested and confirmed to be compatible with GenerateBlocks? This would be a huge help for the community.
    I’d also like to invite other users to share their experiences and mention which TOC plugins are working for them.

    Thanks for your amazing products and your continued support!

  • Hi there,

    1. Would it be possible for your team to investigate if a small code adjustment could be made to GenerateBlocks to restore the previous compatibility? This would be especially helpful for plugins like SimpleTOC that many users enjoy.

    I don’t think it’s something that we can control. Based on the topic you attached, this issue needs to be addressed by the TOC plugin to change the GB headline block name to GB text block. Unfortunately, it’s not possible for us to change the block name back to ‘headline’.

    2. Alternatively, could you consider publishing a short help-desk article or a blog post that lists TOC plugins officially tested and confirmed to be compatible with GenerateBlocks? This would be a huge help for the community.
    I’d also like to invite other users to share their experiences and mention which TOC plugins are working for them.

    I’ll forward this suggestion to our team 🙂 Thanks!

  • I’ll forward this suggestion to our team

    That would be great. Thank you!

  • You are welcome   🙂

  • I have an update about the SimpleToc Plugin. With this workaround, it only works partly for me:

    if (isset($block[“blockName”]) && ($block[“blockName”] === “core/heading” || $block[“blockName”] === “generateblocks/headline”) && isset($block[“innerHTML”]) && isset($block[“innerContent”]) && isset($block[“innerContent”][0])) {

    Change “generateblocks/headline” to “generateblocks/text” and the GenerateBlocks headlines will be recognised again.

    https://wordpress.org/support/topic/simpletoc-generateblocks-2-1-again-not-setting-ids/#post-18698235

    It only works for GenerateBlocks heading block with the integrated icons, not with custom icons. At least that is the case in the free version of GB. If I put a custom icon in the GB heading block, it creates wrong anchor links (like #_clip1 or #a).

    Also, the structure of the heading block with a custom icon looks different in the console compared to a heading block with an integrated icon. This is the one with my custom icon (it has “#_clip1” inside, exactly the anchor I get in SimpleToc for this GB heading block):

    <g clip-path="url(#_clip1)"><path d="M74.904,113.237c0,-18.474 16.781, (....) -22.101 7.267,-22.101Z"></path></g>

    The heading block with an integrated icon looks like this:

    svg aria-hidden="true" role="img" height="1em" width="1em" viewBox="0 0 496 512" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M248 8C111.03 (...) 0-64-28.71-64-64s28.71-64 64-64 64 28.71 64 64-28.71 64-64 64z"></path></svg>

    I am not sure if this is something that can be fixed by the developer from SimpleToc or from your side.

  • Hi there,

    It sounds like an issue related to your custom SVG.

    Can you try using a tool like this to sanitize your SVG code before using it in the headline?
    https://jakearchibald.github.io/svgomg/

  • Hi Ying,
    You’re right, there was an issue with the svg, though the tool didn’t help here, but with mentioning the tool, you gave me the hint to look deeper into the code of the icon. 🙂 Some design programs are adding clipPath (or clip-path), something like that:

    <clipPath id="a">
        <path d="M75 0h362v512H75z"/>
      </clipPath>
      <g clip-path="url(#a)">

    In my case I just could remove that part, and my SVG icon design stayed intact, and it is working now with SimpleToc.

  • Glad to hear that 🙂

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