After updating MODX to 2.8.6-pl, AjaxUpload no longer seems to work
Closed this issue · 6 comments
After updating MODX to 2.8.6-pl, AjaxUpload no longer seems to work. The page with the formit call is loaded, the AjaxUplaod form is displayed. You can now add a file for uploading and shortly afterwards the counter (kb) appears and then the display changes to error. No messages in the error log, nor any info when enabling the debug mode.
Are there any errors in the MODX error log or in the PHP error log? On my dev machine the upload works fine running on 2.8.6-pl.
No. The MODX log remains empty. I have to check whether the PHP error log says anything about this - I have to ask my hoster if I can access the log. In the browser, the JS Console shows the following:
Here in the GIF you can see that the error happens quite quickly after selecting the images:
This happened shortly before the upload stopped working:
- Login v1.9.13-pl was installed.
- getResources v1.7.1-pl was installed.
- Fred TinyMCE RTE v1.1.1-pl was installed.
- Captcha v3.3.6-pl was installed.
- Guzzle7 v7.8.0-pl was installed.
- UpgradeMODX v2.3.5-pl was installed.
- Guzzle7 v7.8.0-pl was installed.
- MODX remotely upgraded from v2.8.5-pl to v2.8.6-pl
I don't see anything that could be responsible for this. But if it works for you on MODX 2.8.6-pl. I'll have to keep looking...
The error 500 should be visible in the PHP error log. Did you update the PHP version when you updated MODX?
Hi Jako, got access to the php log finaly
[12-Mar-2024 09:32:44 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Argument 2 passed to phpthumb::__set() must be an instance of mixed, bool given in /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/phpthumb.class.php:317 Stack trace: #0 /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/phpthumb.class.php(395): phpthumb->__set('cache_source_en...', false) #1 /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/modphpthumb.class.php(84): phpthumb->setParameter('cache_source_en...', false) #2 /usr/www/users/xxxxx/xxxxx/core/components/ajaxupload/src/AjaxUpload.php(309): modPhpThumb->initialize() #3 /usr/www/users/xxxxx/xxxxx/core/components/ajaxupload/processors/web/upload.class.php(121): TreehillStudio\AjaxUpload\AjaxUpload->generateThumbnail(Array) #4 /usr/www/users/xxxxx/xxxxx/core/components/ajaxupload/processors/web/upload.class.php(38): AjaxUploadUploadProcessor->createUploads('image') #5 /usr/www/users/xxxxx/xxxxx/core/model/modx/modprocessor.class.php(185): AjaxUploadUploadProcessor->process() #6 /usr/www/users/xxxxx/xxxxx/core/model/mo in /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/phpthumb.class.php on line 317 [12-Mar-2024 09:32:56 Europe/Berlin] PHP Fatal error: Uncaught TypeError: Argument 2 passed to phpthumb::__set() must be an instance of mixed, bool given in /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/phpthumb.class.php:317 Stack trace: #0 /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/phpthumb.class.php(395): phpthumb->__set('cache_source_en...', false) #1 /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/modphpthumb.class.php(84): phpthumb->setParameter('cache_source_en...', false) #2 /usr/www/users/xxxxx/xxxxx/core/components/ajaxupload/src/AjaxUpload.php(309): modPhpThumb->initialize() #3 /usr/www/users/xxxxx/xxxxx/core/components/ajaxupload/processors/web/upload.class.php(121): TreehillStudio\AjaxUpload\AjaxUpload->generateThumbnail(Array) #4 /usr/www/users/xxxxx/xxxxx/core/components/ajaxupload/processors/web/upload.class.php(38): AjaxUploadUploadProcessor->createUploads('image') #5 /usr/www/users/xxxxx/xxxxx/core/model/modx/modprocessor.class.php(185): AjaxUploadUploadProcessor->process() #6 /usr/www/users/xxxxx/xxxxx/core/model/mo in /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/phpthumb.class.php on line 317
Seems to be related to phpthumb somehow:
PHP Fatal error: Uncaught TypeError: Argument 2 passed to phpthumb::__set() must be an instance of mixed, bool given in /usr/www/users/xxxxx/xxxxx/core/model/phpthumb/phpthumb.class.php:317
It looks like this issue: modxcms/revolution#16468
It can be fixed with: https://github.com/modxcms/revolution/pull/16506/files
That's awesome! Thank you very much! Sorry that I suspected AjaxUpload ;-)