Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
602 stars 345 forks source link

Sphinx search results show "404: Page not found" in preview snippets #1692

Closed speth closed 3 months ago

speth commented 5 months ago

Problem description

In the Sphinx documentation for the development version, the content preview snippet for each result page is showing text from the 404 page rather than the from the page that contains the search string. The page title is correct, and this links to the correct page. This affects all search results except those to specific API documented objects, where no preview is typically given.

Steps to reproduce

  1. Follow this link for a search results page: https://cantera.org/dev/search.html?q=equilibrium#

Behavior

  1. See search results:

image


  1. Note the URLs that are being accessed in the server logs:
    - - [24/Apr/2024:16:51:14 +0000] "GET /dev/undefinedexamples/matlab_experimental/flame.html HTTP/1.1" 404 6131 "https://cantera.org/dev/search.html?q=equilibrium" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0"

Note the substring undefined which is incorrectly being injected into the URL.

This does not occur with the current "stable" / 3.0 documentation. For example, see https://cantera.org/documentation/docs-3.0/sphinx/html/search.html?q=equilibrium#.

System information

speth commented 3 months ago

Using the copy of the docs that hosted at testing.cantera.org, which I think will be representative of how things are set up after the transition, the behavior is slightly different. There are no longer any 404 errors, and Sphinx reads all the relevant pages, but then doesn't show any preview snippets. See https://testing.cantera.org/stable/search.html?q=equilibrium#, for example.

speth commented 3 months ago

Aha! the version of this affecting testing.cantera.org is this due to https://github.com/pydata/pydata-sphinx-theme/issues/1676, which should be fixed if we update to pydata-sphinx-theme 0.15.2 or newer.