Summary
Hey everyone. After update to MODX 3.0.x, the popular addon phpthumbof became broken.
After some research I found that required class modPhpThumb was moved from core/model/phpthumb/… to core/src/Revolution/modPhpThumb.php. In phpthumbof snippet this class basicly loads with loadClass, but I can’t do it for new version:
- If I rename it to modphpthumb.class.php or require class directly, I have an exception Uncaught Error: Class ‘modPhpThumb’ not found in …/core/components/phpthumbof/model/phpthumbof/phpthumbof.class.php:193.
- If I connect class directly not from snippet but from phpthumbof.class.php, I have another error message: Cannot declare class MODX\Revolution\modPhpThumb, because the name is already in use in …/core/src/Revolution/modPhpThumb.php on line 23.
Phpthumbof is a very old addon and I think that there will be no official fix for this issue. Do anyone have any experience about usage phpthumbof with MODX 3 or maybe there is any another plugin with same functionality working with MODX 3?
Step to reproduce
Try to use phpthumbof with MODX 3.0.x and read error logs.
Observed behavior
See summary
Expected behavior
Correct work of phpthumbof plugin
Environment
MODX 3.0.2, php 7.4