Community forum for knowledge and support

Updated 6 months ago

Troubleshooting the Malfunctioning Table of Contents

At a glance

The community member is experiencing an issue with the table of contents (TOC) on a specific subpage of their website. The TOC was previously working, but has now stopped functioning. The community member has checked the Finsweet automatic support, which indicates that everything is okay, but the TOC is still not working.

In the comments, another community member suggests that the issue may be related to the richtext field being in a component. Another community member notes that the TOC script is not present on the page where the TOC is supposed to be displayed.

The community member has removed the component and added the TOC script to the subpage, but the issue persists. After some discussion, the community members determine that the TOC script needs to be placed in the head section of the page, as the JavaScript needs to render something on the page, and it needs to load first. This solution worked, and the TOC is now functioning correctly.

Useful resources

Hi, Is there anyone who is able to trace why the TOC has stopped working? It was working, finsweet automatic support shows that everything ok, nevertheless it is not working.

TOC subpage:
https://zima-design.webflow.io/portfolio/jak-polaczyc-nft-z-butelka-wina-luksusowy-marketplace-dla-inwestorow?fs-attributes-support=true

Webflow preview: https://preview.webflow.com/preview/zima-design?utm_medium=preview_link&utm_source=dashboard&utm_content=zima-design&preview=d3e9cb339a9b0a3e376fc28d84334c82&workflow=preview

Any tips more then welcome! Have a great day!

M
G
17 comments

just curious - why is the richtext field in a component? I wonder if that has something to do with it?

I have removed the component, but toc script is added in this subpage.

what subpage? The self-support is saying the script is not on the page where the table of contents is, so we have to put it on that page - let me know what subpage you are talking about.

im talking about portfolio page

yeah very strange, wonder why it wasn't detected?

maybe i will move it to page header

okay so the detection was right, got it

yeah it makes sense that it needs to be in the < head > because the JS needs to render something on the page

anytime JS needs to "render" something on the page, the script needs to load first

anytime JS needs to analyze something, track something, report on something, can be done later - in the footer or < /body > - there are other use cases, but just for all of us to remember which place it should go

oh i see!! thank you!!

Add a reply
Sign up and join the conversation on Slack