Support » Plugin: Advanced Custom Fields: Image Crop Add-on » PHP Error: Undefined index

  • dadra

    (@dadra)


    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 15 replies - 1 through 15 (of 20 total)
  • Just popping in to say I’m having this issue too!

    Bump. Note that deactivating ACF Image Crop Add-on removes the warnings and notices.

    ACF Pro Version 5.5.9
    Image crop add-on Version 1.4.10
    Wordpress 4.7.2

    Notice: Undefined index: url in /…/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php on line 3851

    Warning: Cannot modify header information – headers already sent by (output started at /…/wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php:3851) in /…/wp-includes/pluggable.php on line 1179

    • This reply was modified 7 months, 3 weeks ago by  21stcn.
    • This reply was modified 7 months, 3 weeks ago by  21stcn.

    same problem here. Everything is up-to-date and same error appears.

    damn it. having the exact same problem. 🙁

    Yep, same issue here!

    Same exact problem here too!

    Same problem !

    I’m running ACF Pro v 5.4 and there is no problem.

    Could you please copy the rows around line 3886 of /wp-content/plugins/advanced-custom-fields-pro/api/api-helpers.php. Might help to see what the url index is used for, and why it might be undefined.

    When you save the post, is the field actually updated? Does the image change the way you want. The initial error indicates that the printed php notice message is sent to the browser – and therefor the redirect that should be made back to the edit screen can’t be made (cannot modify headers... already sent...). So a quick and ugly fix would be to make sure no php errors are printed. I.e. error_reporting(-1), define('WB_DEBUG', false), print_errors Off and so on…

    However – it would of course be best to fix the first php notice.

    Thats correct. You need max. ACF Version 5.5.3 for the cropper to run without errors. if you update acf to a higher version, you will get the index error.

    Bump. Having the same issue still when saving a page with ACF fields.

    Running WP 4.2.7, ACF 5.5.11, ACF Image Crop 1.4.10

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

    @petron99 – could you please check my previous post. Trying to help you to figure out what’s wrong. The plugin developer seems to some what pre occupied to maintain plugin. If we can fix this issue perhaps we can give him/her a working patch.

    @hawaiipersson For me, the image does crop properly, but you’re correct, it’s sending me to the error page after update, rather than back to the edit page with a nice little notice to let me know it’s been updated properly.

    Plugin Author andersthorborg

    (@andersthorborg)

    Hi guys,

    Version 1.4.10 should address this issue.

    Let me know if you experience further problems.

    I’m sorry for the slow response.

    Best,

    Anders

    Hi Anders,

    I’m still having the same issue with version 1.4.10. ACF 5.5.11. WP 4.7.3.

    Any ideas?

    Thanks.

    To clarify, version 1.4.10 is the version where I saw the problem originally. Are you saying a new version is coming to address the issue? Just trying to understand and hoping for a solution. 🙂

    Thanks for your great work on this plugin!

Viewing 15 replies - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.