Download & Extend

Table of contents does not show if only the Node type is edited. Make a copy of the filter settings in each node type.

Project:Table of Contents
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Table of contents does not show when option "If no [toc ...], automatically add one at the top of the page" is selected and number of headers is more than "Number of headers before an automatic table of content is added: " setting.

I have not managed to get the table of contents to show automatically even after playing around with the settings for half an hour..

Comments

#1

Hmmm... Can you post an example of your HTML code here?

Put it between <code>...</code> tags so you don't have to change each < and > character...

It works for me so I don't really see why it would fail completely like this unless the HTML code is not parsed properly, somehow.

Thank you.
Alexis

#2

Managed to reproduce it. It doesn't have to do with the HTML code that being is parsed.
Can you try to edit and then save a node that should show the TOC "If no [toc ...], automatically add one at the top of the page" option enabled.
I have a guess that it adds it the first time around and then forgets about it.
If I rearrange the filters in the input format it comes up again but goes away after node save.
It has something to do with caching(if you ask me).

Good luck with it.

#3

I'm glad to know that it works, some times.

If you think it is the cache, can you do a Clear Cache, then go back to the page and see it working?

Otherwise, on my end I have plenty of caches too and it works for me... I use the Normal mode of the Drupal system and Boost. The filter can also be cached if I recall, but you do not have control over that.

Inter filter problems could occur, but if saw the table once, there is no reason to believe that this is the problem.

The one other thing would be that you have a filter with an invalid cache behavior, it thinks that the previous filters cache is good, when it isn't. I never had such a problem though.

Thank you.
Alexis

#4

It's working rather strange. Whenever I rearrange filter order the TOC shows up again. If I edit node and save TOC goes away.

Do you see any reason for this to happen?

#5

Hi Poka_dan,

There are the possible cases when the TOC is not shown:

  1. There is no [toc] or [vtoc] and the automatic TOC is not activated.
  2. The automatic TOC is activated, but the minimum number of headers is too small.
  3. The [toc hide:1;] is present in the node.
  4. Another filter removes the result (?!) or removes the tag (i.e. [toc]) before the table is generated.
  5. You are looking at the teaser and the "No toc in Teaser" is active.

Are you sure you are not looking at the teaser?

Otherwise, moving the filters around would have been my take, but you're saying you've tried that... The [toc] generates a <div> tag and if you have a filter removing those, then that could be it. But there would be no reason to see the table when moving filters around, and lose it after an edit! Are you using the Drupal Performance Block Cache feature?

Thank you.
Alexis

#6

Thank you Alexis Wilke and the other developers on the TOC module. It's awesome. Finally I have a lot of the functionality that I used to have on twiki now in drupal.

I experienced the problem of TOC not automatically showing up as well. I don't know if this helps either one of you but I set on my content type settings for a particular content type (i.e. page or book) to create the TOC automatically.

This was not working for me. I could make it manually but not automatically.

I then looked in the Full HTML input filter and clicked on configure... and found another automatic drop down that was set to "Do not automatically add TOC".

I set that as well to auto and now it seems to work correctly.

I like the top links under header or paragraphs as well... nice touch!

Thx again!

#7

Title:Table of contents does not show.» Table of contents does not show if only the Node type is edited. Make a copy of the filter settings in each node type.

Changing the title to express the problem in link with the node type. That's a bug which needs to be fixed at some point.

nobody click here