Requirements aren't reindexed on some pages
With version 1.13.4,
A customer has the error "404-Not Found: key = null" on the page,
It has to be related to a 'null' requirement, but we can't find the specific root cause.
We've tried to mitigate it in 1.13.6 by preventing macros with 'null' keys from being posted. It worked, but it was only a workaround. Why, after all, were the keys null?
It happens when a user copies the requirement from the view mode, by selecting text instead of opening the right-click menu and selecting "Copy link address".
When pasted, it looks like a link in the Confluence editor, but it keeps the CSS classes ("requirement-macro" and "requirement-needs-excerpt").
When pasting requirements in the editor, we already catch RY URLs (We transform them into "macro"-type links). We'll also catch RY links, i.e. not just strings starting with `https://...` but also HTML code starting with `<a href="https://...`.
When loading existing content in the editor, we'll remove the RY-related classes from `<a>` tags, such as "requirement-macro", "requirement-link-macro" and "requirement-needs-excerpt". Simply opening and closing a comment will be enough to remove the extraneous CSS classes.
The result of the parsing is now visible in the icon at the top of the page: