v1.5.43 - Table of contents
On a members-only post, the table of contents was listing the paywall. A visitor who was not signed in saw a contents list with a single entry, and that entry was the "this post is for members" message rather than anything in the post. Where the public part of the post did have headings, the same message was tacked on to the end of the list.
The contents list is built in the reader's browser from the headings on the page — and the members message is itself a heading, sitting in the same place as the post's own. There was nothing to tell them apart.
Now the list shows only what the reader can actually see: the headings in the public part of the post, and never the ones behind the paywall. If the public part has no headings at all, the whole contents section is hidden rather than left standing empty.
Bug fixes
- The members message no longer appears in the table of contents. On a locked post read by a signed-out visitor, the list shows the headings in the public preview and nothing else. See Post templates.
- An empty contents section is now hidden instead of shown. Previously a post with no headings — locked or public — got the "Table of contents" heading and its dividing rules with nothing between them.
- The contents list no longer lists itself. On the "All Levels" template every list began with an entry reading "Table of contents", pointing at the box it was inside. On the "First Level" templates the same thing happened on any post whose headings were all H4 or below.
Nothing to do after updating. If you run a membership site, it is worth opening one locked post in a private window to see the difference — that is the only place the fault was visible, and being signed in hid it completely.