Support

Account

Home Forums Add-ons User Submitted Undefined index: url when using Image Crop add-on

Solved

Undefined index: url when using Image Crop add-on

  • Hi,

    Not sure when this started, but on the site I’m currently developing (Nginx on Ubuntu with latest versions of WordPress/ACF/all addons and plugins), I get a PHP error when I save a post that has a populated ACF Image Crop field added.

    If I use the native ACF Image field, it goes through just fine. Same goes if I use the Image Crop field, but leave it empty on the post. However, if I try to save my post with the Crop field populated, I get the following error:

    Notice: Undefined index: url in /vagrant/www/web/app/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3851
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0001	310088	{main}( )	../post.php:0
    2	0.2128	13157304	edit_post( )	../post.php:193
    3	0.2177	13237920	wp_update_post( )	../post.php:378
    4	0.2190	13268768	wp_insert_post( )	../post.php:3578
    5	0.2547	13576360	do_action( )	../post.php:3505
    6	0.2547	13577256	WP_Hook->do_action( )	../plugin.php:453
    7	0.2547	13577352	WP_Hook->apply_filters( )	../class-wp-hook.php:323
    8	0.2547	13579024	call_user_func_array ( )	../class-wp-hook.php:300
    9	0.2547	13579160	acf_form_post->save_post( )	../class-wp-hook.php:300
    10	0.2550	13579424	acf_validate_save_post( )	../post.php:548
    11	0.2550	13579472	acf_validation->validate_save_post( )	../validation.php:428
    12	0.2550	13579520	do_action( )	../validation.php:308
    13	0.2550	13580192	WP_Hook->do_action( )	../plugin.php:453
    14	0.2550	13580288	WP_Hook->apply_filters( )	../class-wp-hook.php:323
    15	0.2550	13581728	call_user_func_array ( )	../class-wp-hook.php:298
    16	0.2550	13582096	acf_validation->acf_validate_save_post( )	../class-wp-hook.php:298
    17	0.2552	13587568	acf_validate_value( )	../validation.php:285
    18	0.2552	13587656	acf_validation->validate_value( )	../validation.php:448
    19	0.2552	13588112	apply_filters( )	../validation.php:225
    20	0.2552	13591912	WP_Hook->apply_filters( )	../plugin.php:203
    21	0.2552	13593680	call_user_func_array ( )	../class-wp-hook.php:298
    22	0.2552	13594336	acf_field_image->validate_value( )	../class-wp-hook.php:298
    23	0.2552	13594496	acf_field_file->validate_value( )	../image.php:478
    24	0.2552	13595432	acf_validate_attachment( )	../file.php:436
    

    Strange thing is, the post seems to save normally. If I go back to the edit screen for that post, the field is populated and retains the proper crop dimensions.

    Any ideas?

  • For errors in this add on you should ask the developer of the add on https://wordpress.org/support/plugin/acf-image-crop-add-on and look in that forum to see if there’s a solution.

  • Good point. Looks like at least one other person over there is having the same problem. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.