Skip to content
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

Images pointing to "fileadmin/_processed_" files are broken after upgrading TYPO3 from 11.5 to 12.4 #304

Open
instruccionesaldorso opened this issue Nov 7, 2024 · 2 comments

Comments

@instruccionesaldorso
Copy link

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
@maschmiede
Copy link

maschmiede commented Nov 22, 2024

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.

@instruccionesaldorso
Copy link
Author

@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 word _processed_ e.g.

SELECT uid, sys_file.identifier
FROM sys_file
INNER JOIN sys_refindex
ON sys_file.uid = sys_refindex.ref_uid
WHERE sys_file.storage = 2 AND
sys_refindex.tablename = 'tt_content' AND
sys_refindex.field = 'bodytext' AND
sys_refindex.ref_table = 'sys_file'
ORDER BY sys_file.uid;

I replaced the path 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants