We are creating URL-based links within Redactor fields that point to Solspace calendar events. Upon saving, the links to any calendar events are broken in the frontend, appearing like
This feature expects that elements implement the refHandle() method. Without it, content gets saved with an invalid reference tag. At rendering, this invalid reference tag prevents the fallback URL from being used. Solspace Calendar does not implement the refHandle() method inside its Event element.
I've opened an issue with Solspace about adding the missing refHandle method, but this seems like it may have been an unexpected breaking change. Should Redactor just be skipping the reference tag creation when there is no refHandle rather than generating an invalid one?
Description
We are creating URL-based links within Redactor fields that point to Solspace calendar events. Upon saving, the links to any calendar events are broken in the frontend, appearing like
Entries work fine, as do non-Craft external URLs.
After investigating, we see that Redactor 2.9 added a feature where all URLs are parsed on save and checked to see if they correspond to an existing element (see https://github.com/craftcms/redactor/commit/a6772463a332a5c8a535e31d4d27a9cbea09ed12)
This feature expects that elements implement the refHandle() method. Without it, content gets saved with an invalid reference tag. At rendering, this invalid reference tag prevents the fallback URL from being used. Solspace Calendar does not implement the refHandle() method inside its Event element.
I've opened an issue with Solspace about adding the missing refHandle method, but this seems like it may have been an unexpected breaking change. Should Redactor just be skipping the reference tag creation when there is no refHandle rather than generating an invalid one?
Additional info