• Hi Anders,

    Since updating to version 1.4.10 of the add-on, and ACF version 5.5.8, I get a PHP error when attempting to save a page with a populated ACF Image Crop field:

    Notice: Undefined index: url in /Applications/MAMP/htdocs/sites/cafs-fm/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3886

    Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/sites/cafs-fm/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php:3886) in /Applications/MAMP/htdocs/sites/cafs-fm/wp-admin/post.php on line 197

    Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/sites/cafs-fm/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php:3886) in /Applications/MAMP/htdocs/sites/cafs-fm/wp-includes/pluggable.php on line 1179

    Unpopulated ACF Image Crop fields do not cause the error.

    Any thoughts? Thanks.

Viewing 5 replies - 16 through 20 (of 20 total)
  • I also seem to be having an issue with this – I just started using ACF Pro (Version 5.5.14) with the image crop plugin (Version 1.4.10). I started saving some posts and pages and getting the error:

    Notice: Undefined index: url in /Volumes/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/website/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3982
    
    Notice: Undefined index: url in /Volumes/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/website/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3982
    
    Warning: Cannot modify header information - headers already sent by (output started at /Volumes/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/website/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php:3982) in /Volumes/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/website/wp-admin/post.php on line 197
    
    Warning: Cannot modify header information - headers already sent by (output started at /Volumes/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/website/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php:3982) in /Volumes/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/website/wp-includes/pluggable.php on line 1210

    (I’ve ‘X’ed out all private info!)

    This is a great plugin I use a lot – very strange it just started doing this, but again, if the image crop field is not used there’s no problem…

    Anyone managed to resolve this?

    Regards, Alex

    • This reply was modified 7 years, 4 months ago by alsterb.
    • This reply was modified 7 years, 4 months ago by alsterb.

    Hi guys

    Elliot here – ACF dev.

    Just wanted to chime in here and let you know I am aware of the issue and apologize for the bug.
    I’ve commented on the ‘image crop’ github issue with a solution:
    https://github.com/andersthorborg/ACF-Image-Crop/issues/45

    Can you please test that out and let me know if it works for you????????

    Hi Elliot – will have a go!

    I changed all the image with user crop fields back to normal image ones, but I’ll play around with the version on my local dev to see what happens – will post back soon!

    Regards, Alex

    Okay – gave it a go, but still the header errors. Maybe I placed the empty initialise function in the wrong place? I put it in the act-image-crop-v5.php just after the first opening bracket?:

    class acf_field_image_crop extends acf_field_image {
    
    	
    	function initialize() {
    		
    		/* do nothing */
    			
    	}
    
            ....
    
    

    Was that the right location?

    Okay – just seen how the plugin has been updated – no problems at all now, works like a charm!

    Just want to say thank you, because this plugin makes life for my clients so much easier….

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘PHP Error: Undefined index’ is closed to new replies.