backdrop-ops / docs.backdropcms.org

Website for displaying Backdrop CMS documentation and API source code.
https://docs.backdropcms.org/
6 stars 6 forks source link

Searching for 80% gives 500 error when navigating to page 2 #184

Open yorkshire-pudding opened 2 years ago

yorkshire-pudding commented 2 years ago

Steps to reproduce

  1. Go to https://docs.backdropcms.org/search/node/
  2. Enter 80% as the keyword with no quotes
  3. Scroll to the bottom and click either the 2 link, next page link or last page link to go to https://docs.backdropcms.org/search/node/80%25?page=1

Expected result Second page of results for search

Actual result returns 500 error image

Confirmed in alternative browser and by @indigoxela and @BWPanda see Zulip chat Same search in forums (https://forum.backdropcms.org/search/node/80%25?page=1) works Searching for 50%, 30%, 25%, 100% works

ghost commented 2 years ago

I've confirmed the issue on a local copy of the docs site. On my copy, the 2nd page does eventually come up, but it takes ages, and my laptop fan's running pretty fast. I installed the Devel module and turned on performance/memory logging.

Here are the results for the first 3 pages for "50%" search:

Page execution time was 115.36 ms. Memory used at: devel_boot()=0.91 MB, devel_shutdown()=4.32 MB, PHP peak=6 MB.
Page execution time was 5119.38 ms. Memory used at: devel_boot()=0.91 MB, devel_shutdown()=4.41 MB, PHP peak=12 MB.
Page execution time was 10746.27 ms. Memory used at: devel_boot()=0.91 MB, devel_shutdown()=4.97 MB, PHP peak=32 MB.

And here are the results for the 2 pages for "80%" search:

Page execution time was 6567.68 ms. Memory used at: devel_boot()=0.91 MB, devel_shutdown()=4.44 MB, PHP peak=14 MB.
Page execution time was 67084.55 ms. Memory used at: devel_boot()=0.91 MB, devel_shutdown()=5.83 MB, PHP peak=20 MB.

Finally, here's what the 2nd page of results actually shows:

image.png

ghost commented 2 years ago

I suspect it's the editor CSS files. They're minified, so everything's on one line. Perhaps it's too intensive a task to parse those lines for the matching search text to display...