dshanske / simple-location

Adds Basic Location Support to Wordpress
https://wordpress.org/plugins/simple-location
Other
29 stars 14 forks source link

Post-processing of the image failed #151

Closed troutcolor closed 4 years ago

troutcolor commented 4 years ago

I got this message on trying to upload an image:

Post-processing of the image failed. If this is a photo or a large image, please scale it down to 2500 pixels and upload it again.

The image was one originally from my iPhone but messed about with quite a lot. Turning off simple-location allowed me to upload: https://johnjohnston.info/blog/in-colour/

I also got a message from WordPress.com with some details:

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, Simple Location.

When seeking help with this issue, you may be asked for some of the following information: WordPress version 5.3.2 Current theme: sempress Child (version 1.0.0) Current plugin: Simple Location (version 4.0.4) PHP version 7.3.3

Error Details

An error of type E_ERROR was caused in line 1008 of the file /Customer_web_sites/johnjohnston/public_html/blog/wp-content/plugins/simple-location/includes/class-geo-data.php. Error message: Uncaught TypeError: DateTimeZone::__construct() expects parameter 1 to be string, object given in /Customer_web_sites/johnjohnston/public_html/blog/wp-content/plugins/simple-location/includes/class-geo-data.php:1008 Stack trace:

0 /Customer_web_sites/johnjohnston/public_html/blog/wp-content/plugins/simple-location/includes/class-geo-data.php(1008): DateTimeZone->__construct(Object(DateTimeZone))

1 /Customer_web_sites/johnjohnston/public_html/blog/wp-content/plugins/simple-location/includes/class-geo-data.php(503): wp_exif_datetime('2020:03:14 08:0...', Object(DateTimeZone))

2 /Customer_web_sites/johnjohnston/public_html/blog/wp-includes/class-wp-hook.php(288): WP_Geo_Data::exif_data(Array, '/Customer_web_s...', 2, false, Array)

3 /Customer_web_sites/johnjohnston/public_html/blog/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)

4 /Customer_web_sites/johnjohnston/public_html/blog/wp-admin/includes/image.php(853): apply_filters('wp_read_image_m...', Array, '/Customer_web_s...', 2, false, Ar

Hope this is of some use. The image started as an iPhone snap, processed in hyperspectivity outputting 9 images, these turned into a grid with a shortcut. Transferred to mac via photos, exported at 1200pixels then run through ImageOptim to cut the file size down.

Cheers

john

dshanske commented 4 years ago

I see the problem. New fix will be available soon. It's the new EXIF code I added.

troutcolor commented 4 years ago

😊 thanks.

dshanske commented 4 years ago

Committed a fix. Going to see if there are any other minor fixes before I merge it. If you are interested, it is all part of my attempt to fix the timestamp WordPress generates, which is always wrong because of timezones.

dshanske commented 4 years ago

Fixed by #152

troutcolor commented 4 years ago

Thanks a lot, got the update via WordPress.org and it works for me. Cheers, John