#105525Garbage in header_link field of tt_content leads to error in ReferenceIndex update
Description
Some editor pasted a phone number like “+491234561423523523” in the header_link field, which leads to this error:
In ExceptionConverter.php line 118:
An exception occurred while executing a query: Out of range value for column ‘ref_uid’ at row 1
In StatementError.php line 29:
Out of range value for column ‘ref_uid’ at row 1
In Statement.php line 153:
Out of range value for column ‘ref_uid’ at row 1
The ReferenceIndex receives a match from TypoLinkSoftReferenceParser for type db relation “pages” with value “+491234561423523523” which will be casted to an int in createEntryDataUsingRecord method, and will of course be out of range.
———-
It was probably possible to save this value in older TYPO3 versions. In v12 inserting such a value will lead immediately to this error. So invalid links should simply be discarded on save. And for the next major version, the SoftReferenceParser / ReferenceIndex should be hardened to not fall back to default a pages relation as last resort and throw an exception instead.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.