• Resolved noonanbobby

    (@noonanbobby)


    Super excited to use your plugin. I’ve been using ACF Image Crop, and finally upgraded our site….only to find that ACF Image Crop didnt work anymore. What is the quickest way to get your plugin up and running? We have many images fields…and I’d rather not have to manually recreate them.

    Thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author joppuyo

    (@joppuyo)

    Hey, glad you like the plugin.

    There is a backwards compatibility feature in this plugin if you come from ACF Image Crop so that the fields are displayed correctly in the WordPress admin and in the frontend. When you save the post, the data format is changed from the old format to the new format used by this plugin.

    You’ll have to configure the fields to use the new field type but after that, the process should be automatic.

    Thread Starter noonanbobby

    (@noonanbobby)

    thanks for responding. sorry for asking dumb questions…i just dont want to screw anything up. What is the first step to doing this migration?

    -Manually record all of the field information (cropping specs, conditional logic, etc)
    -Delete Old fields
    -Delete Old Plugin
    -Active Your plugin
    -Recreate all new cropping Fields with the same information as the old plugin

    Is this the only method? I have around 30 fields that would need to be recreated.

    • This reply was modified 4 years, 5 months ago by noonanbobby.
    Plugin Author joppuyo

    (@joppuyo)

    Hey,

    You don’t need to delete the old plugin, you can use them side-by-side until the migration is complete. This will make the process easier since you can change the field types one by one.

    When all of them have been changed, you can remove the old plugin.

    I also recommend you to take a backup of the site database and uploads folder in case any issues may arise during the migration.

    Thread Starter noonanbobby

    (@noonanbobby)

    Cool. so I did everything, but now im getting an error “Failed to crop image”. It actually seemed like it was working for little bit…so im not sure what happened.

    Edit:

    I just checked my debug log, and I’m seeing this:

    PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::get_size() in /home/xyz/public_html/admin/wp-content/plugins/acf-image-aspect-ratio-crop/acf-image-aspect-ratio-crop.php:226

    • This reply was modified 4 years, 5 months ago by noonanbobby.
    • This reply was modified 4 years, 5 months ago by noonanbobby.
    • This reply was modified 4 years, 5 months ago by noonanbobby.
    Thread Starter noonanbobby

    (@noonanbobby)

    I’m also seeing a 500 error with wp-admin/admin-ajax.php in chrome dev tools.

    Plugin Author joppuyo

    (@joppuyo)

    Hey, looks like the plugin is trying to access the original version of the image. Could you verify that the file name is something like my-image-scaled.jpeg?

    There should also be an image with the file name like my-image.jpeg (without the scaled suffix) in the same directory.

    Thanks

    Thread Starter noonanbobby

    (@noonanbobby)

    yes. i see the “….-scaled.jpg” version”. but it is still giving me an error “Failed to crop image”.

    Plugin Author joppuyo

    (@joppuyo)

    Do you have a version without the -scaled suffix in the same folder?

    If that image is missing, it might be that the path is saved in the database but the file itself has been deleted.

    I think I can add an additional check to the plugin in order to fix this issue.

    Thread Starter noonanbobby

    (@noonanbobby)

    i see 2 versions of each image:

    1 – xxxxxxxx-scaled_1920x1080_acf_cropped.jpg
    2 – xxxxxxxx-scaled.jpg

    Plugin Author joppuyo

    (@joppuyo)

    Hey,

    I just released v4.1.1 which should fix this issue. Could you try updating and see if you can reproduce the issue?

    Thread Starter noonanbobby

    (@noonanbobby)

    Unfortunately, I am still receiving the error “Failed to crop image”.

    I’d also like to add that if I open up a record, and click the crop button on an exiting image (to change the crop), nothing happens.

    Where I see the error “Failed to crop image” is when I remove the existing image, and select a new image from the media gallery. The crop box popup opens, allowing me to change crop. but when I click “Crop”, it shows me an error in the bottom right of the window.

    Thank you so much for your help with this, by the way…terrific support.

    Thread Starter noonanbobby

    (@noonanbobby)

    Here is the error in the log viewer:

    [14-Oct-2020 15:22:10 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method WP_Error::get_size() in /home/xxxx/public_html/admin/wp-content/plugins/acf-image-aspect-ratio-crop/acf-image-aspect-ratio-crop.php:234
    Stack trace:
    #0 /home/xxxx/public_html/admin/wp-includes/class-wp-hook.php(287): npx_acf_plugin_image_aspect_ratio_crop->{closure}('')
    #1 /home/xxxx/public_html/admin/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #2 /home/xxxx/public_html/admin/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /home/xxxx/public_html/admin/wp-admin/admin-ajax.php(176): do_action('wp_ajax_acf_ima...')
    #4 {main}
      thrown in /home/xxx/public_html/admin/wp-content/plugins/acf-image-aspect-ratio-crop/acf-image-aspect-ratio-crop.php on line 234
    [14-Oct-2020 15:23:58 UTC] WP_Error Object
    (
        [errors] => Array
            (
                [image_no_editor] => Array
                    (
                        [0] => No editor could be selected.
                    )
    
            )
    
        [error_data] => Array
            (
            )

    )

    • This reply was modified 4 years, 5 months ago by noonanbobby.
    Plugin Author joppuyo

    (@joppuyo)

    “No editor could be selected” means that you don’t have ImageMagick or GD installed. You could check Tools ?? Site Health and see if there are any errors about missing PHP modules.

    Thread Starter noonanbobby

    (@noonanbobby)

    Yup! I answered my own question! I recently upgraded my php to 7.4, and GD wasnt switched on. It works now.

    Thank you so very much for your help on this. seriously incredible support. Hopefully you continue to update this plugin for many years to come ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘ACF image Crop Migration’ is closed to new replies.