MBS-14221: Ensure WikiDoc pages load with ToC #3701
Merged
+3
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix MBS-14221
Problem
The transcluded doc pages in MB no longer include table of contents, which can be a pain especially for long ones such as [Indexed Search Syntax
Solution
The MeB wiki now defaults to a modern Vector skin that no longer includes the table of content for the page as part of the content itself (it's a separate sidebar instead). But the WikiDoc code doesn't know to search for it there, so an unexpected side effect is that all the ToCs are just gone.
This forces the use of an old skin (MonoBook) when calling
render, to ensure the ToC will be returned with the content. This solves the issue for now, while avoiding a larger rewrite which would make sense if we decide to keep using WikiDoc but not if we finally move most docs to RTD/github.Testing
Manually, by loading a doc page from my local server without the
useskinparameter (no ToC), then runningredis-cli flushallto drop the cache and reloading it with the parameter (ToC now appears).