When I add a block to the editor for the first time, I get a console error:
Uncaught SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
This only happens when the block is added to the Gutenberg editor. If I save the page and reload, then there are no further console errors, even if this block is on the page.
I noticed this because once I’d added this block while writing content, suddenly the saving button wouldn’t animate during a save as a product of the Javascript halting execution.
It’s worth noting that the plugin and the block itself are functioning perfectly, so this isn’t a major break.
This happens in both my local copy and the production copy of the website.
Server info:
Server architecture Linux 5.15.0-102-generic x86_64
Web server nginx/1.26.1
PHP version 8.3.8 (Supports 64bit values)
PHP SAPI fpm-fcgi
PHP max input variables 1000
PHP time limit 120
PHP memory limit 256M
Max input time 60
Upload max filesize 64M
PHP post max size 64M
cURL version 7.81.0 OpenSSL/3.0.2
Is SUHOSIN installed? No
Is the Imagick library available? Yes
Are pretty permalinks supported? Yes
Current time 2024-07-05T13:25:13+00:00
Current UTC time Friday, 05-Jul-24 13:25:13 UTC
Current Server time 2024-07-05T13:25:10+00:00
The only quirk with this WordPress installation is that /admin is used for the login page, but I don’t think that should have any affect on the JS being parsed.
If you need any extra information, please don’t hesitate to ask.
]]>Hello,
I am using the Table of Contents plugin and encountering an alignment issue. The TOC and the article text are sticking together without any space between them. I would like to vertically center the article text relative to the TOC, so there is equal space between them.
I have tried various CSS adjustments without success. Could you please provide some advice or a CSS code to resolve this issue?
]]>Hello!
I am using Heroic ToC plugin which works very well. However in combination with RevivePress, some of the articles cannot be edited. There is a bug and the admin page cannot be loaded. As soon as I deactivate Heroic ToC everything works again.
There is no PHP error, just a console error:
SyntaxError: Expected property name or '}' in JSON at position 2 (line 1 column 3)
at JSON.parse (<anonymous>)
at t.value (blocks.build.js?ver=1653118560:1:3965)
at element.min.js?ver=cb762d190aebbec25b27:9:6400
at B (element.min.js?ver=cb762d190aebbec25b27:9:6423)
at Z (element.min.js?ver=cb762d190aebbec25b27:9:7430)
at Y (element.min.js?ver=cb762d190aebbec25b27:9:6890)
at B (element.min.js?ver=cb762d190aebbec25b27:9:6189)
at Fr (blocks.min.js?ver=6612d078dfaf28b875b8:19:9484)
at blocks.min.js?ver=6612d078dfaf28b875b8:19:38594
at to (blocks.min.js?ver=6612d078dfaf28b875b8:19:38710)
ar @ react-dom.min.js?ver=18.2.0:10
t.callback @ react-dom.min.js?ver=18.2.0:10
tt @ react-dom.min.js?ver=18.2.0:10
Jr @ react-dom.min.js?ver=18.2.0:10
Zr @ react-dom.min.js?ver=18.2.0:10
Gr @ react-dom.min.js?ver=18.2.0:10
(anonymous) @ react-dom.min.js?ver=18.2.0:10
xl @ react-dom.min.js?ver=18.2.0:10
fl @ react-dom.min.js?ver=18.2.0:10
Nn @ react-dom.min.js?ver=18.2.0:10
(anonymous) @ react-dom.min.js?ver=18.2.0:10
setTimeout (async)
s @ data.min.js?ver=e6595ba1a7cd34429f66:2
i @ data.min.js?ver=e6595ba1a7cd34429f66:2
(anonymous) @ edit-post.min.js?ver=82b743695f8ef1673753:7
(anonymous) @ data.min.js?ver=e6595ba1a7cd34429f66:9
__unstableMarkListeningStores @ data.min.js?ver=e6595ba1a7cd34429f66:2
(anonymous) @ data.min.js?ver=e6595ba1a7cd34429f66:2
p @ data.min.js?ver=e6595ba1a7cd34429f66:9
(anonymous) @ data.min.js?ver=e6595ba1a7cd34429f66:9
Qe @ data.min.js?ver=e6595ba1a7cd34429f66:9
Ye @ data.min.js?ver=e6595ba1a7cd34429f66:9
_r @ edit-post.min.js?ver=82b743695f8ef1673753:7
wt @ react-dom.min.js?ver=18.2.0:10
js @ react-dom.min.js?ver=18.2.0:10
wl @ react-dom.min.js?ver=18.2.0:10
bl @ react-dom.min.js?ver=18.2.0:10
yl @ react-dom.min.js?ver=18.2.0:10
ol @ react-dom.min.js?ver=18.2.0:10
v @ react.min.js?ver=18.2.0:10
ce @ react.min.js?ver=18.2.0:10
react-dom.min.js?ver=18.2.0:10 Uncaught SyntaxError: Expected property name or '}' in JSON at position 2 (line 1 column 3)
at JSON.parse (<anonymous>)
at t.value (blocks.build.js?ver=1653118560:1:3965)
at element.min.js?ver=cb762d190aebbec25b27:9:6400
at B (element.min.js?ver=cb762d190aebbec25b27:9:6423)
at Z (element.min.js?ver=cb762d190aebbec25b27:9:7430)
at Y (element.min.js?ver=cb762d190aebbec25b27:9:6890)
at B (element.min.js?ver=cb762d190aebbec25b27:9:6189)
at Fr (blocks.min.js?ver=6612d078dfaf28b875b8:19:9484)
at blocks.min.js?ver=6612d078dfaf28b875b8:19:38594
at to (blocks.min.js?ver=6612d078dfaf28b875b8:19:38710)
Do you know what might be causing the issue? There is no source file in the plugin or a git repository I could find to debug the issue myself. Thank you in advance for any assistance!
]]>It has been 2 years since this plugin has had an update. Has this plugin been abandoned?
]]>Is there a way to Turn off the title it adds before the TOC the span with class “htoc__title”?
]]>I’m experiencing the same issue as previously described under “HTML anchors added automatically”.
HTML anchors are automatically added to all headings, but also to p-tags. This is unnecessary when, for example, only H2 tags are enabled. Unfortunately, the full text content is inserted into the unnecessary anchor text of the p-tags, such as <p id=”long text content”>.
Is there a solution for this problem? The plugin files are minified, otherwise, I would try to come up with a solution myself.
Setup:
WordPress 6.2.2
Gutenberg
I have a WordPress site that requires the use of the HeroThemes plugins for a KnowAll theme.
Somewhere in the their plugin or theme code, they are overriding how Heading elements appear on the front-end. Whenever I try to use a heading block on a Page or a Post, the back-end renders perfectly fine on save or publish. But the front-end displays the element with a funky ID and duplicates the Heading text into the ID value. Also, the advanced CSS classes do not carry over, and the ID is the same value as the text in the Heading. Its just awful.
Is there a way, when I create my own create-block plugin, I can override this other mess that is going on, when I call for an Heading block on my edit page?
Again, this is a front-end issue. The H1 – H6 element blocks are all jacked up with the knowall theme on the front-end of the site. Whatever WordPress does to call Gutenerberg Block code from the back-end, onto the front-end, I want that to happen for H1 – H6 blocks, instead of what the knowall theme is doing.
How can I force that to happen?
]]>
Whenever I reopen a WordPress page for editing, or reselect the table of contents in an open page, Heroic TOC forgets the Show/Hide settings and marks everything Show.
]]>Hi,
I’m enjoying your plugin but ran into an issue. I recently tried having the TOC hamburger collapsed by default enabled (having the TOC hidden on the page by default). The page is working fine on the front end, but whenever I go back to it in the admin post editor, i get the dreaded white screen of death ??
I found this out by disabling the plugin, and the post is fine again. Tested a few times, seems repeatable.
Heroic TOC Plugin: v1.2.1
WordPress: v6.1.1
Theme: Twenty Twenty-Two WordPress Core Theme
The site and post uses Gutenberg editor, and it’s Multi-site.
I get some React error in the dev console:
>SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
I just toggled it back on by default but wanted to let you know. Thanks again!
]]>Hello,
when using heroic table of content everything works fine as a preview but when releasing an article the burger menu is displayed without the “three lines”:
Any idea why this happens and how to fix it?
We are running wordpress v 6.1.1
Cheers
]]>Dear Team,
I love the speed of the plugin, but it is not working.
Please see attached page:
It only scans H2 and that’s it. The other content is ignored.
Best regards,
Julia
thanks to the developer of the plugin
please with the screenshots on the plugin page, the nested headings are display in this format 1.1., 1.2, 1.3.1 and so on, but on page it resets the number on the next the heading
like;
1. heading 1
1. sub-1
2. sub-2
instead of;
1. heading 1
1.1 sub-1
2.2 sub-2
Hi guys,
your plugin is great. I have a question for you.
Could you suggest me a way to change the shape of the bulleted list markers? I would like to change the square markers to round markers. Is it possible to do this adding custom CSS to the WordPress Customizer ?
Thanks
I would like to make some changes, such as adding some animations, changing the appearance of the default styles a little, among others, will there be the possibility that the source code will be published or does it already exist?
]]>Hi! Is your TOC block AMP compatible?
]]>Your plugin don’t take into account Hn created with kadence blocks, only “title block” of gutenberg, it’s a big issue for us. Why don’t take into account all Hn in a page / post instead of only Hn in “gutenberg title block” ?
]]>Need to add the TOC on all articles with a predefined configuration like many of competitors plugin.
– add your table of content on all the articles of the site which have more than 3 <h2>, in 1 click, after the 1st paragraph.
– i spoke with wordpress developers and they tell me that it would be better to see this with you than to do something custom in your corner. They estimate 3 to 5 working days. I’m ready to participate.
]]>Hello,
how to make the table of contents sticky at the top of the page when we scroll down ?
Regards,
]]>how to modify by default this title by the french translation “SOMMAIRE” ? https://imgur.com/a/RhQqS4S
]]>I’ve noticed that HTML anchors are added also to (some) Paragraphs. This is obviously unnecessary and when trying to remove it, it’s added again automatically.
When removing the plugin, the issue is resolved.
Setup:
WordPress 5.8.3
Genesis with Child theme
Gutenberg
Is this known/expected and/or is there a fix for this?
Best,
]]>Hi, thank for your plugin.
I just wonder how is possibile remove table content from wordpress excerpt.
Hello,
One question about this good plugin.
I working with this plugin on your theme “HelpGuru” but view thath in all Table of Contents option you have in HelpGuru Theme the plugin or the theme add a little black point in all the lines in the table.
This is no so good in mobile because they take up a lot of space on the line
I view in the code that (class=”ht_toc_list”) is responsible for generating those black points in all the line.
Go with a screenshot:
https://i.imgur.com/mpbX71M.png
Have any possibility to delete this black point in the table of contents line?
Thanks!
Hi! I am trying to work with the plugin and I would love to be able to add my table of contents in the left sidebar. I was able to add it but it doesn’t pick up the heading. At the same time, it works on the post.
Thanks
]]>Hi. Would you create a fixing (and put it as an option on the plugin options) to fix the problem of the anchor going to very top of the viewport, but when the page has a top floating navbar, the anchors are hidden by the navbar. I′ve tried to fix it using css, but got no success. May you update it on the next plugin update?
]]>Hey there,
I really love the simplicity of your plugin and the ability to hide single headlines, awesome, thank you for this little gem ??
I just cannot use it, as it’s obviously not integrated well with headline blocks from other third-party-blocks, such as GenerateBlocks or Kadence Blocks.
Any chance to update your plugin accordingly in the near future?
Thank you in advance and kind regards,
Sascha
If I place a reusable content block that includes a heading on a page, HTOC does not include it. In my example, it’s the last section about licensing.
]]>Can you tell me if it’s possible to disable the load animation for the plugin? Thanks
]]>If you have a post or page where Heroic Table of Contents has been used, you can duplicate/clone it. Blank page shows up. I have tested a few post/page duplicators.
]]>Hello,
I added the plugin, it seems nice except when you click on any content it is not going to the topic that you click. It’s just refreshing the page.
Any ideas
Hi,
How i can put manually in post? existe un shortcode o <php echo….. ?> or do shortcode to insert it manually
thanks
]]>