-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Thumbnails not working in the media browser in PHP 7.4 #16468
Comments
It seems that there has been an update to the phpThumb library (that is used by MODX to create thumbnails) that is not compatible with PHP 7.4. But I believe this issue has to be fixed in phpThumb and not in MODX. The problem is this pull request: For a quick fix, you could either change the PHP version to at least 8.0, or delete the word |
halftrainedharry's solution worked. Many thanks! |
SVGs maybe shouldn't try generating thumbnails and just be passed through w/o a thumbnail? |
Agree, but it looks, that phpthumb tries to make the preview and gives the following errors:
Interesting:
But in the media browser svg preview looks as follows:
|
This should already be implemented. There are exceptions in the code for SVGs: revolution/core/src/Revolution/Sources/modMediaSource.php Lines 2238 to 2246 in 8feb62f
When I test it, it seems to work correctly (at least in MODX 3.0.3-pl). |
This issue has been mentioned on MODX Community. There might be relevant details there: https://community.modx.com/t/modx-2-8-6-php-7-4-breaks-thumbnails-in-the-manager/7100/1 |
PR submitted to the upstream repo: JamesHeinrich/phpThumb#218 |
This issue has been mentioned on MODX Community. There might be relevant details there: https://community.modx.com/t/no-image-thumbnails-after-modx-3-upgrade/7353/2 |
### What does it do? Updates phpThumb to v1.7.22-202312071641 ### Why is it needed? Fixes the issue with thumbnails not being generated when running on PHP 7.4 (or earlier). ### How to test Make sure thumbnails are being generated in the media browser when running on PHP 7.4. ### Related issue(s)/PR(s) Resolves #16468 for the 2.x branch
Hi @opengeek sorry to bug you on this one but it'd be epic to get a release out with this fix. People (like me and many other) stiil get updates websites and catches thumbnail bugs! Community chat warming with reports, manual codefixes coming to the wild... But v2.8.7 milestone is only 58% complete, may be we can flush it faster? |
Work is definitely happening @dimasites … some of the issues/PRs may not make the 2.8.7 release depending on testing and feedback, but the important phpThumb one definitely will. |
We will be releasing it very soon. I would not pay much attention to the milestones—issues and PRs tend to get assigned to them with little regard for reality. |
Thanks @opengeek and @rthrash for answers! But for critical bugs please (it is only my point) lets make immidiate solutions! May be even hotfix-release with revert bad commit, because problems like this, make damage to friendliness and popularity of MODX. I know about PHP 7.4 lifetime (yes, it is over), but we all knows: many and many MODX sites use PHP 7.4, much more then PHP8... And I'll show you confirmation that it's critical. See screenshots with stat, based on ~4.2k MODX Apps (components) install/upgrade/uninstall over last ~15 months (with only about 50% of Russian because its from MODX RSC data-source: All additional screen for representation: Based on this stats, we see over 95% MODX website's affected the bug, and even this stats not 100% accurate, even half of MODX users is overmuch I think, we need (or must) to be more responsible with critical bug fixing! it is not security issue, but strog Developer UX issue... P.S. I cant and dont want to make any pressure, but want stronly highlight problem! Also i hope my examples and arguments were at least informative for you, thank you for your attention! And very thanks for working on such a wonderful project as MODX! |
+1 for bump fixed version faster! |
+2 for bump fixed version faster! |
+1 for bump fixed version faster! |
Long time have this problem... |
+1 for bump fixed version faster! |
1 similar comment
+1 for bump fixed version faster! |
This issue is resolved with the vendor fix for phpthumb in both 2.8.7 and 3.0.5. |
Bug report
Summary
Thumbnails not working in the media browser.
Step to reproduce
Upload any image (jpg, png) in the media browser, no thumbnails.
Observed behavior
Trying to navigate the url given in the 'not found'
<img src='/site/connectors/system/phpthumb.php?src=assets%252Fvideo-iframe.png&w=100&h=0&HTTP_MODAUTH=modx64e51c266752a2.30117216_164f338950c1714.28557021&f=png&q=90&wctx=mgr&source=1&t=1693977472&ar=x'>
I get:
Error Log, set to Debug mode:
Expected behavior
Thumbnails should work.
Environment
3.1.0-dev
PHP 7.4.30
Apache 2.4
Mysql 5.7.17
ModX 2.8.4 works in the same environment as expected.
The text was updated successfully, but these errors were encountered: