t3x-rte_ckeditor_image
t3x-rte_ckeditor_image copied to clipboard
Images pointing to "fileadmin/_processed_" files are broken after upgrading TYPO3 from 11.5 to 12.4
Question
After upgrading TYPO3 from 11.5 to 12.4 version and EXT:rte_ckeditor_image from 11.0.5 to 12.0.2 version, images pointing to fileadmin/_processed_ folder are all broken. Example:
<p>
<img class="" src="/fileadmin/_processed_/c/5/csm_Glattwalzen_Homepage_209a6a939f.jpg" data-htmlarea-file-uid="2858" data-htmlarea-file-table="sys_file" width="627" height="300" title="" alt="" data-title-override="true" data-alt-override="true">
</p>
It seemed to me that in earlier versions of the extension, when attaching an image in the RTE field and scaling it to a different size, the original path was not written under the src attribute but the already scaled file under fileadmin/_processed_ was written there instead.
This does not happen in TYPO3 12.4 and with the new extension's version: when you attach an image to the RTE, the original path to the file (same path/identifier as sys_file.uid under the data-htmlarea-file-uid attribute) is written in the src attribute.
Now that we upgraded a project to TYPO3 12.4, these processed images are not present in the system physically and they're not regenerated again when removing temporary assets in the Install Tool (all fileadmin/_processed_ folder is deleted).
What can we do in this situation? We don't wanna go change the src attribute manually in every content element.
Environment
- TYPO3 version: 12.4.22
- PHP version: 8.1.30
- Extension version: 12.0.2
I have the same problem coming from TYPO3 11 to 12. At least you can open and save every content element and the problem is gone. But I wonder if it would be possible to create a script (command line or button in the BE) for that replacements. 🤔 It's painful doing it by hand for over 500 tt_content elements.
Edit: We decided in our case to keep the /fileadmin/processed/ folder. After put it back in every image works again.
@maschmiede That did not work for me. I had to make a query to get all RTE fields in tt_content.bodytext (and other places like tt_content.header_link, etc) that contained the string _processed_ inside.
I replaced the path for that file containing the string _processed_ using the data- attribute in the image there that contains the sys_file.uid and getting the sys_file.identifier.
Luckily, not a bunch of records had to be replaced (less than 100 records).
The problem is solved for me. However, it would have been nice to get an official upgrade wizard from the extension to fix this issue.
Please make sure to include the typoscript of rte_ckeditor_image BEFORE fluid_styled_content. This should trigger recreating any missing processed files.
P.S. for typo3 v11, this is not fully working. see #187
@Ceremony64 :Thank you for your last post. I was able to restore all the inserted images.
Added upgrade wizzard with #327 - still needs to be ported to v12 and main (v13)
Hi!
The issue should be fixed after including the static template CKEditor Image Support before the fluid_styled_content template. This ensures processed images are rebuilt correctly.
We've also added an upgrade wizard #327. See the new "Upgrade from v11" section in the README for details #328 .
Closing as duplicate of #291.
This issue has the same root cause: Extension uses lib.parseFunc_RTE in TYPO3 v12 without declaring the dependency on fluid_styled_content which provides it.
See #291 for complete analysis, quickfix workarounds, and upcoming fix in TYPO3_12 branch.
Related issues: #291 #293 #29
Cross-reference
Issue #317 ("Use PDF as image in editor") is another duplicate with the same root cause.
All will be fixed by PR #375.