Summary
There is a discrepancy between the expected props in custom search templates (content/search/_result.mdx) and what is
actually passed by the runtime. Templates attempting to access props.result (as seen in previous patterns or examples) fail
because the data is passed as props.record.
Details
Expected: props.result.title, props.result.href, etc.
Actual: props.record.title, props.record.href, etc.
Impact
Users creating custom search result layouts encounter TypeError: Cannot read properties of undefined when trying to
access props.result.
Recommendation
Update the documentation and default templates to clearly specify that the search result object is passed as record, or map the prop to result for backward compatibility
Summary
There is a discrepancy between the expected props in custom search templates (content/search/_result.mdx) and what is
actually passed by the runtime. Templates attempting to access props.result (as seen in previous patterns or examples) fail
because the data is passed as props.record.
Details
Expected: props.result.title, props.result.href, etc.
Actual: props.record.title, props.record.href, etc.
Impact
Users creating custom search result layouts encounter TypeError: Cannot read properties of undefined when trying to
access props.result.
Recommendation
Update the documentation and default templates to clearly specify that the search result object is passed as record, or map the prop to result for backward compatibility