django / djangoproject.com

Source code to djangoproject.com
https://www.djangoproject.com/
BSD 3-Clause "New" or "Revised" License
1.86k stars 939 forks source link

Search Results Rendered as Plain Text JSON #1547

Closed hehenischal closed 2 weeks ago

hehenischal commented 2 weeks ago

Description

The search results on the Django documentation website are not rendering correctly. Instead of displaying the search results properly, the JSON structure is being displayed as plain text.

Steps to Reproduce

  1. Go to docs.djangoproject.com
  2. Use the search functionality to search for a term, such as "Formsets"
  3. Observe the search results

Expected Behavior

The search results should be displayed in a readable format with proper links and descriptions.

Actual Behavior

Some part of displayed results are displayed as plain text JSON. while the description is rendering fine. Screenshot 2024-06-14 213500

bmispelon commented 2 weeks ago

Hi and thanks for the report. It seems that the upgrade we did in af1aa64862384d6f2e22d68c934e4b8463243b66 broke the search results.

I'll look into it 🕵🏻

bmispelon commented 2 weeks ago

Looks like that fixed it, even though I'm not totally sure why 😅

(Gonna look into it a bit closer, and maybe add some tests so that we noticed this kinds of problems in the future)

Thanks again for the quick (and detailed) report, it's much appreciated 🙇🏻