Wiki search throws 500 error for some wiki content
What does this MR do and why?
Added an empty
check inside simple_search_highlight_and_truncate
. Without this check Truncato.truncate
was raising an exception when the text is an empty string. Since I have added an empty check inside simple_search_highlight_and_truncate
, I have removed issuable.description.present?
check from highlight_and_truncate_issuable
.
References
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Create a wiki with no content. Provide only the title
- Search for this wiki with the title.
- On
master
, you will get an exception - On the fixed branch, you will see the result get rendered.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #551900 (closed)
Edited by Ravi Kumar