Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when moving "sidebar-nav-bs" from html_sidebars to secondary_sidebar_items #1702

Open
bryan-brancotte opened this issue Feb 2, 2024 · 0 comments

Comments

@bryan-brancotte
Copy link

Hi,

Impacted version are 0.15.1 and 0.15.2 ; is working with 0.14.4 ; both using Sphinx==7.2.6

Here is a fragment of my conf.py:

html_theme_options = {
    "use_edit_page_button": True,
    "navigation_with_keys": True,
    "secondary_sidebar_items": [
        "sidebar-nav-bs",
        "page-toc",
        "sourcelink",
        "edit-this-page",
    ], # put section nav on the right
}
html_sidebars = { # remove left side bar as section are now on the right
  "**": []
}

Which throw me this error:

Extension error (pydata_sphinx_theme.utils):
Handler <function set_secondary_sidebar_items at 0x7faddc02b880> for event 'html-page-context' threw 
an exception (exception: Template requested to generate a TocTree fragment but no suitable ancestor 
found to act as root node. Please report this to theme developers.)
make: *** [Makefile:21: html] Error 2

When commenting "sidebar-nav-bs", is works, so does when moving it to html_sidebars as it is by default

If you need more information to spot the issue feel free to ask

Best wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant