-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v11 BUG: RTE parser too permissive for old file links syntax #111
Comments
I checked in every TYPO3 version back to v10 how TYPO3 stores links. It is always a t3 URN. ( |
I already removed all legacy syntax from our system. In fact, all occurrences were links pointing to an old TYPO3 instance (
I don't know how many instances might still use the old syntax though. They would have had to upgrade from an old version ( But I would assume it's fair to remove support for legacy in the ContentPublisher, as long as this is announced as a potentially breaking change for older instances that might still have them somewhere… |
Thank you for your research, it has shed some light on the old file link syntax for me. It's clear that this kind of link will only ocurr in an anchor tag href attribute. Therefore i can change the regex accordingly. Dropping the support is not possible since we promise to support everything that works in TYPO3 (excluding 3rd party extensions obviously). |
…rich text Releases: #111 Releases: https://projekte.in2code.de/issues/60981
…rich text Releases: #111 Releases: https://projekte.in2code.de/issues/60981
We discovered than using
file:(int)
in RTE fields caused the ContentPublisher to add an association to the file with the id, even if it was just within a regular text, or as a part of an external URL.For example, entering the following text in a RTE field would create two relations to file
123
and456
(whether they exist or not 🫤) although there is no need for it:It seems the DefaultRecordFinder::fetchRelatedRecordsByRte is too permissive on detecting old typo3 link syntax:
in2publish_core/Classes/Component/RecordHandling/DefaultRecordFinder.php
Lines 651 to 665 in b27e5ad
Maybe this method should use
HtmlParser::splitIntoBlock
to only targethref
attributes of<a>
tags? (Or should other tags such aslink
also be considered?). Happy to open a pull request for it if you see fit.ℹ️ At least, this doesn't seem to be the case in v12 🎉
The text was updated successfully, but these errors were encountered: