Review main Merged

27884[BUGFIX] Regenerate missing RTE magic image on rendering

Stanislas Rolland CR +2 V +2 Hard +255 −100 updated 03/19/14, 19:51

Commit message

Problem: Magic images inserted in RTE content may be missing,
for instance after flushing the _processed_ directory.
Solution: Regenerate any missing magic image when rendering the content
element.

Review

  • Code review CR +2
    • Stanislas Rolland +2
    • Wouter Wolters +1
    • Frans Saris +1
    • Fabien Udriot +1
  • Verified V +2
    • Stanislas Rolland +2
    • Frans Saris +1
    • Fabien Udriot +1

Files 7

Review log 66

Show 41 earlier messages
  1. Stanislas Rolland uploaded patch set 2 02/26/14, 21:01

  2. Stanislas Rolland commented on patch set 2 02/26/14, 21:02

    Updated commit message.
  3. Stanislas Rolland wrote 02/26/14, 21:02

    Topic set to "fal".
  4. Mr. Jenkins commented on patch set 1 02/26/14, 21:10

  5. Mr. Jenkins commented on patch set 2 02/26/14, 21:15

  6. Frans Saris commented on patch set 2 02/27/14, 17:44

    Can't you use or extract code from RteHtmlParser? To reduce duplicate code
  7. Stanislas Rolland uploaded patch set 3 03/06/14, 04:05

  8. Mr. Jenkins commented on patch set 3 03/06/14, 04:19

  9. Stefan Froemken commented on patch set 3 CR -1 03/10/14, 16:12

    ImageRenderingController.php:82

    Imgage -> Image

    setup.txt:13

    Imgage -> Image
  10. Stanislas Rolland uploaded patch set 4 03/10/14, 16:33

  11. Stefan Froemken commented on patch set 4 V -1 03/10/14, 16:41

    Sorry for disturbing you again. Maybe I have forgotten to clear cache. But RTE-Images are now completely removed from FE.

    ImageRenderingController.php:138

    In FE the image tag isn't there. Maybe one or two lines are missing here to add the processed file HTML to $content?!
  12. Mr. Jenkins commented on patch set 4 03/10/14, 16:46

  13. Stanislas Rolland commented on patch set 4 03/10/14, 17:05

    @Stefan: Can't reproduce... You should certainly flush all caches.
  14. Stanislas Rolland commented on patch set 4 03/10/14, 20:28

    @Stefan: You may have to clear all caches with the install tool.
  15. Stefan Froemken commented on patch set 4 03/11/14, 08:21

    Good Morning Stanislas. I just pulled the newest TYPO3-Master, truncated all cf_* tables. As you told me I have clicked on "Clear Cache" in Installtool, I have pressed all clear cache buttons in BE and I have deleted typo3temp/Cache directory. After applying your patch I have created a new tt_content element of type TEXT and inserted an image into the RTE. Click on save and no image appears in FE. After switching back to current master the image was displayed again.
  16. Frans Saris commented on patch set 4 03/11/14, 09:03

    Same problem here. Image isn't rendered anymore after applying patch.
  17. Sebastian Kieper commented on patch set 4 V -1 03/11/14, 15:53

    In my System the Patch Crashes with the Message Fatal error: Call to a member function getStorage() on a non-object in /var/www/typo3/core/typo3/sysext/rtehtmlarea/Classes/Controller/ImageRenderingController.php on line 90
  18. Stanislas Rolland commented on patch set 4 03/11/14, 15:54

    Strange. I am still unable to reproduce this problem.
  19. Frans Saris commented on patch set 4 03/11/14, 15:59

    I tested on Ubuntu with PHP 5.4.17 and TYPO3 current master
  20. Fabien Udriot commented on patch set 4 03/11/14, 16:01

    I can confirm the Exception
  21. Sebastian Kieper commented on patch set 4 03/11/14, 16:07

    my system is a debian with PHP Version 5.4.26 and also the current master
  22. Fabien Udriot commented on patch set 4 03/11/14, 16:11

    ImageRenderingController.php:79

    The method docs is wrong here string $content array $conf
  23. Stanislas Rolland uploaded patch set 5 03/11/14, 16:11

  24. Frans Saris commented on patch set 5 03/11/14, 16:14

    maybe it has to something to do with autoincluding of typo3/sysext/rtehtmlarea/Configuration/TypoScript/ImageRendering/setup.txt?
  25. Stanislas Rolland commented on patch set 5 03/11/14, 16:35

    @Frans: the setup is being included on my system. Is it not on yours? You should see it in lib.parseFunc_RTE.tags.img.preUserFunc = ... But if it is not, then the userFunc is just not called so the change should have no effect.
  26. Stanislas Rolland uploaded patch set 6 03/11/14, 17:05

  27. Stanislas Rolland commented on patch set 6 03/11/14, 17:09

    ok. I think this should fix the issue I could not reproduce because the clickenlarge feature was fixing it...
  28. Mr. Jenkins commented on patch set 5 03/11/14, 17:26

  29. Sebastian Kieper commented on patch set 6 V +1 03/11/14, 17:33

    Now it works on my system. The Image is being generated again, after deleting it from _processed_ file
  30. Mr. Jenkins commented on patch set 6 03/11/14, 18:19

  31. Fabien Udriot commented on patch set 6 CR -1 03/12/14, 08:20

    The issue with the current approach is it only considers local files and file processing on remote storage would fail. I am working on improving this aspect and should come up with a patch along the day.
  32. Fabien Udriot uploaded patch set 7 03/12/14, 13:55

  33. Mr. Jenkins commented on patch set 7 CR -1 V -1 03/12/14, 14:19

  34. Stanislas Rolland commented on patch set 7 03/12/14, 15:28

    ImageRenderingController.php:95

    The image should not be re-created if is not a magic image that was deleted. Presence of attribute data-htmlarea-file-uid is not an indication that the image is a magic image.
  35. Stanislas Rolland uploaded patch set 8 03/15/14, 19:15

  36. Frans Saris commented on patch set 8 03/15/14, 19:23

    ImageRenderingController.php:192

    Is this save? // can also be the start for a external resource
  37. Mr. Jenkins commented on patch set 8 CR -1 V -1 03/15/14, 19:28

  38. Stanislas Rolland uploaded patch set 9 03/15/14, 20:05

  39. Mr. Jenkins commented on patch set 9 CR -1 V -1 03/15/14, 20:21

  40. Fabien Udriot uploaded patch set 10 03/17/14, 11:04

  41. Mr. Jenkins commented on patch set 10 03/17/14, 11:18

  1. Fabien Udriot commented on patch set 10 V -1 CR -1 03/17/14, 11:45

    Currently updating the patch to rather use "data-htmlarea-file-processing" as hook for security reason. e.g. someone could introduce malicious commands which will be handed over to ImageMagick.
  2. Fabien Udriot uploaded patch set 11 03/17/14, 13:45

  3. Mr. Jenkins commented on patch set 11 03/17/14, 13:59

  4. Fabien Udriot commented on patch set 11 03/17/14, 14:12

    Patch is ready for comment.
  5. Stanislas Rolland commented on patch set 11 03/17/14, 19:44

    So, we are now into features unrelated to the original purpose of this change...
  6. Stanislas Rolland commented on patch set 11 03/17/14, 20:28

    @Fabien: Please submit your hook addition as a distinct change.
  7. Stanislas Rolland uploaded patch set 12 03/17/14, 20:29

  8. Mr. Jenkins commented on patch set 12 03/17/14, 20:42

  9. Fabien Udriot voted on patch set 12 V +1 CR +1 03/17/14, 22:40

  10. Wouter Wolters commented on patch set 12 03/18/14, 19:43

    RteHtmlParser.php:1761

    $logManager

    MagicImageService.php:85

    space too much

    ImageRenderingController.php:5

    spaces before *

    ImageRenderingController.php:163

    $logManager
  11. Stanislas Rolland uploaded patch set 13 03/18/14, 22:11

  12. Fabien Udriot voted on patch set 13 V +1 CR +1 03/18/14, 22:13

  13. Wouter Wolters voted on patch set 13 CR +1 03/18/14, 22:15

  14. Mr. Jenkins commented on patch set 13 03/18/14, 22:24

  15. Frans Saris commented on patch set 13 03/19/14, 07:22

    The images are re-generated but the image tag params are not cleaned. I got allparams= data-htmlarea-file-ui= data-htmlarea-file-table= Maybe it is something in my tsconfig as data-htmlarea-file-ui= data-htmlarea-file-table= also stay without the patch
  16. Fabien Udriot commented on patch set 13 V -1 03/19/14, 08:27

    In latest revisions the attribute "allparams" is not removed on the FE. The issue was already in the first version of the patch but was fixed at some one until version 11 of the patch. Have a look there how it has been solved. Ex: <img src=".." allparams="src=&quot;fileadmin/_processed_/csm_...
  17. Stanislas Rolland commented on patch set 13 03/19/14, 14:05

    @Frans: data-htmlarea-file-ui and data-htmlarea-file-table should be unset by TS config set by typo3/sysext/rtehtmlarea/Configuration/TypoScript/ImageRendering/setup.txt (they should not be unset in the preUserFunc because they may be needed by the click-enlarge feature). Are images enabled in your rtehtmlarea extension configuration? Where did you set allparams?
  18. Stanislas Rolland uploaded patch set 14 03/19/14, 14:28

  19. Mr. Jenkins commented on patch set 14 03/19/14, 14:41

  20. Stanislas Rolland commented on patch set 14 03/19/14, 15:09

    Patch Set 14 should unset allparams, data-htmlarea-file-ui and data-htmlarea-file-table
  21. Frans Saris voted on patch set 14 V +1 CR +1 03/19/14, 16:17

  22. Fabien Udriot voted on patch set 14 V +1 CR +1 03/19/14, 18:43

  23. Wouter Wolters voted on patch set 14 CR +1 03/19/14, 18:48

  24. Stanislas Rolland voted on patch set 14 V +2 CR +2 03/19/14, 19:51

  25. Stanislas Rolland merged patch set 15 03/19/14, 19:51