- 🇫🇷France mably
The attach method is called by Drupal after the page has been loaded, this problem should not occur.
When the page loads, the TOC block is created, but it is empty and contains no title.
Access the page with placed and correctly configured TOC block. It is empty.
Only in rare cases when swapping between pages and accessing again the page on which the TOC is placed the titles appear.
The problem is that the content on the page and the blocks from which the titles are taken for the TOC block load later than the block itself, i.e. when the block loads it has nowhere to take the titles.
The solution is to use $(document).ready()
, to detect when the page is loaded. Only after then run the toc.js
functionality.
Write/rewrite a proper patch that will handle this particular case.
The TOC data will appear.
No.
No.
Closed: cannot reproduce
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
The attach method is called by Drupal after the page has been loaded, this problem should not occur.