Skip to content
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

After updating MODX to 2.8.6-pl, AjaxUpload no longer seems to work #67

Closed
FlipFlop1974 opened this issue Mar 3, 2024 · 6 comments
Closed

Comments

@FlipFlop1974
Copy link

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.

ajayupaoderror

@Jako
Copy link
Owner

Jako commented Mar 6, 2024

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.

@FlipFlop1974
Copy link
Author

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:
image
Here in the GIF you can see that the error happens quite quickly after selecting the images:
07-03-2024_17-19-10

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...

@Jako
Copy link
Owner

Jako commented Mar 7, 2024

The error 500 should be visible in the PHP error log. Did you update the PHP version when you updated MODX?

@FlipFlop1974
Copy link
Author

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

@Jako
Copy link
Owner

Jako commented Mar 12, 2024

It looks like this issue: modxcms/revolution#16468

It can be fixed with: https://github.com/modxcms/revolution/pull/16506/files

@Jako Jako closed this as completed Mar 12, 2024
@FlipFlop1974
Copy link
Author

That's awesome! Thank you very much! Sorry that I suspected AjaxUpload ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants