• Resolved wandernity

    (@wandernity)


    After the latest update Table of Contents block seems to be broken on my blog. In the published posts it looks fine, but when I try to open an existing post that has a Table of contents for editing, I get an error and can’t even see the editor:

    TypeError: t.content.replace is not a function
    at https://mydomain.com/wp-content/plugins/gutenberg/build/block-library/index.min.js?ver=cfc4e44a6d1101d34b7a:123:41270 (The error is longer, but I’m not sure if it helps to solve this issue.)

    I also can’t add a table of Contents to new blog posts. Adding the block and trying to save a draft just crashes the editor.

    When I deactivated Gutenberg plugin, I could open the blog posts, but the Table of Contents block offered to be converted to HTML. I was able to delete it.

    What should I do in this situation? Can I try to delete/add the Gutenberg plugin? Wouldn’t that break anything existing that uses Gutenberg blocks?

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Felipe Santos

    (@foosantos)

    Hi there,

    Does that only happens after you added a specific plugin?

    You’re probably experiencing a conflict — a code on a theme or plugin conflicts with the code on the editor.

    Ideally, it would be good if you could try with only Gutenberg activated to see if you still reproduce this issue.

    Hi,
    I am also struggling with the table of contents block. Everything works fine until I insert the table of contents block. After I insert the block, it starts acting weird!
    Here are the error messages I can see in the console- https://prnt.sc/iXbn4VykjDmd

    I have only activated the latest Gutenberg plugin and the twenty-fourteen theme on a testing environment. There is no other plugin or theme. It is a fresh install.

    Then I rolled back to 17.2.3; the issue is solved now!

    Moderator jordesign

    (@jordesign)

    Hi @adsha_eee

    TypeError: t.content.replace is not a function
    at?https://mydomain.com/wp-content/plugins/gutenberg/build/block-library/index.min.js?ver=cfc4e44a6d1101d34b7a:123:41270?(The error is longer, but I’m not sure if it helps to solve this issue.)

    Is the error you see in the console this same error? If not – could I please ask you to start a separate support thread with more details?

    Keeping threads separated will help future users find them more easily ??

    Thank you!

    Hey @jordesign,
    The error is the same. I have attached a screenshot. Please click the link, and you can see it. The files mentioned on the console are hooks.js, emitter.js and registry.js

    Moderator jordesign

    (@jordesign)

    Hi folks – I’ve just tested this with the latest version of Gutenberg (17.4.1) and see it is resolved. Could you please update the plugin and check as well?

    Thread Starter wandernity

    (@wandernity)

    For me with Gutenberg 17.4.1 all is fine with the table of contents.

    That’s a relief that I won’t have to go back and fix all posts that used it! Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Table of contents error doesn’t allow to open existing posts’ is closed to new replies.