Skip to content

Today I released two new versions with bugfixes: 3.1.0 (for TYPO3 v11/v12) and 2.2.0 (for TYPO3 v10/v11).

Translation of human-readable anchors in the RTE

Up to now, anchor links in the RTE (as well as backend fields of type inputLink) were not being translated correctly. Instead, the human-readable fragment of the default language was rendered.

This was caused by a missing language overlay in the PSR-14 event ModifyPageLinkConfigurationEvent (TYPO3 v12) and in the hook typolinkModifyParameterForPageLinks (TYPO3 v10/v11) respectively.

To solve the issue, I replaced the Query Builder in the event/hook with ContentObjectRenderer->getRecords(). From now on this method handles the SELECT query for the target record of the fragment link and automatically applies the language overlay, if needed.
The Content Object Renderer was already used in these classes to create the final fragment based on the TypoScript configuration.

Backend JavaScript (only v3.1.0)

Inline JavaScript for custom eval function is deprecated since TYPO3 12.4.

Therefore, I have replaced the inline JavaScript of method returnFieldJS() with a JavaScriptModuleInstruction, which loads the JavaScript as a new module "FragmentEvaluation".

In the second module "FillFragment" (button to generate fragments from the header), "FragmentEvaluation" is now loaded directly. The old call via TBE_EDITOR.customEvalFunctions became obsolete.

To support both TYPO3 v11 and v12 with the extension, the deprecated RequireJS module loader is used for now.

While updating the JavaScript, I noticed problems with TYPO3 v12 in the Development context. The CKEditor 5 inspector, which was recently to the TYPO3 core, is automatically loaded in the RTE in this context and then throws an error ("Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'attach')").
Since this error also occurs with the TypeInput21Eval example of the styleguide extension, I suspect a bug in the TYPO3 core regarding the rather new CKEditor 5 integration.

Back to news list