netresearch / t3x-rte_ckeditor_image

Image support in CKEditor for the TYPO3 ecosystem
GNU Affero General Public License v3.0
56 stars 65 forks source link

[BUGFIX] fix misuse of 11LTS BE processing middleware URLs #194

Closed jpmschuler closed 2 years ago

jpmschuler commented 2 years ago

this fixes #187

The situation is as follows: starting with 11LTS in the backend processed images get not a /fileaadmin/_processed/ "resulting image" style url but a new /typo3/image/process?token "middleware" style url. However that is only available for logged in BE users. Thus this can be saved to RTE and displayed there, however will break the frontend output.

Now I tried to fix what is saved in the backend/db, but came to the conclusion that this shouldn't be the aim, as there are probably reasons for the backend using that new URL.

Thus my approach here is to accept this new URL, accept the "bug" that this new URL gets converted to an absolute URL and rather tackle the problem while generating frontend output, where the generation is skipped formerly, because it sees "external URL". Now an if just checks for the string '/typo3/image/process?token' and starts reprocessing.

jpmschuler commented 2 years ago

(force-push because commit still had a var_dump)

CybotTM commented 2 years ago

Thank you @jpmschuler for your contribution.