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

Installed and activated, error in Media Settings drop-down #12

Closed
presswizards opened this issue Jul 20, 2021 · 3 comments
Closed

Installed and activated, error in Media Settings drop-down #12

presswizards opened this issue Jul 20, 2021 · 3 comments

Comments

@presswizards
Copy link

presswizards commented Jul 20, 2021

On /wp-admin/options-media.php when trying to choose an image format for JPGs, it shows the drop-down as:

  • Use original format (default)
  • There has been a critical error on this website. ...

The email I received details the error:

Error Details

An error of type E_ERROR was caused in line 195 of the file /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/modern-images-wp-main/src/Setting.php. Error message: Uncaught Error: Call to undefined function Modern_Images_WP\str_to_upper() in /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/modern-images-wp-main/src/Setting.php:195
Stack trace:
#0 /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/modern-images-wp-main/src/Setting.php(117): Modern_Images_WP\Setting->isImageFormatSupported()
#1 /var/www/vhosts/domain.com/httpdocs/wp-admin/includes/template.php(1743): Modern_Images_WP\Setting->Modern_Images_WP{closure}()
#2 /var/www/vhosts/domain.com/httpdocs/wp-admin/includes/template.php(1701): do_settings_fields()
#3 /var/www/vhosts/domain.com/httpdocs/wp-admin/options-media.php(156): do_settings_sections()
#4 {main}
thrown

@wolffe
Copy link

wolffe commented Jul 21, 2021

The actual function should be strtoupper() - see here - https://www.php.net/manual/en/function.strtoupper.php

I have edited /src/Setting.php and it started working for me. I noticed it doesn't convert the images in Cover blocks, but I assume this is a WordPress limitation.

@adamsilverstein
Copy link
Owner

Thanks @presswizards this was fixed in #17

@wolffe is that using the original image instead of a sub-sized image?

@wolffe
Copy link

wolffe commented Aug 13, 2021

I can't remember, actually, I stopped using it. It might have the been the original image.

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

3 participants