Closed biedert closed 1 year ago
I can confirm, that image reference is not working anymore. counter is 0. a warning log i written:
Tue, 22 Aug 2023 14:20:12 +0200 [WARNING] request="0487ed6f1fbbe" component="TYPO3.CMS.Core.DataHandling.SoftReference.SoftReferenceParserFactory": No soft reference parser exists for the key "images". - {"parserKey":"images"}
I just tried this with version 11.0.13.
After adding an image in the RTE editor and saving it:
A new entry should appear in the "sys_refindex" table. Filter the “softref_key” column for “rtehtmlarea_images” for instance.
When I try to delete the image via the backend, I get the following warning:
@biedert. @Patta can you please check if the problem still exists with the current version ? (v11.014)
After saving an element, the reference index should be updated automatically. You can check this by
sys_refindex
I have noticed 2 problems so far with images inserted with rte_ckeditor_image and references:
tt_content.bodytext
: The softref parser'rtehtmlarea_images'
must be added to the softref field in the TCA for all affected fields. (If the fields are enabling images to be inserted depends on your RTE configuration, so only necessary to do this where you need it). This is up to you to configure, it will not work out of the box! If you do not do this, the references will not be saved AFAIK.e.g.
Configuration/TCA/Overrides/tx_news_domain_model_news.php:
$softref = explode(',', $GLOBALS['TCA']['tx_news_domain_model_news']['columns']['bodytext']['config']['softref'] ?? '');
if (!in_array('rtehtmlarea_images', $softref, true)) {
$softref[] = 'rtehtmlarea_images';
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['bodytext']['config']['softref'] = implode(',', $softref);
}
You can also compare Configuration/TCA/Overrides/tt_content in rte_ckeditor_image.
If you have the possibility to debug, try setting a breakpoint in RteImageSoftReferenceParser::parse
and findImageTags
Related issue: https://github.com/netresearch/t3x-rte_ckeditor_image/issues/45
@Gitsko this issue is solved for me, yes. update the softref tca as @sypets explained, also fixed this issue with third party extensions.
Question Maybe I misunderstood the purpose of the RteImageSoftReferenceParser, but my expectation would be to get a warning when I try to delete an image which is referenced in a tt_content element with an image reference in the bodytext field. At least in my fresh installation of TYPO3 11.5 with rte_ckeditor_image installed, this is not the case. Am I missing something here?
Environment
Documentation Have you checked the readme/documentation?