Support

Account

Home Forums Bug Reports PHP Error on Pro (latest), custom post type

Solving

PHP Error on Pro (latest), custom post type

  • Hi

    Great plugin, have been using it for years now.

    1. Latest PRO version, latest WP, PHP 7.0
    2. Custom Post Type edit page
    3. There is relation and repeater fields (relation inside repeater)
    4. Add one value only
    5. These error messages appear when there is some value (usingQuery Monitor plugin)
    PHP Error Count Location Call Stack Component
    Warning Illegal string offset ‘acfcloneindex’ 1 wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php:161 acf_field_repeater->render_field()
    wp-includes/plugin.php:525
    do_action(‘acf/render_field/type=repeater’)
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:451
    acf_render_field()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:604
    acf_render_field_wrap()
    wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php:341
    acf_field_repeater->render_field()
    wp-includes/plugin.php:525
    do_action(‘acf/render_field/type=repeater’)
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:451
    acf_render_field()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:604
    acf_render_field_wrap()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:415
    acf_render_fields()
    wp-content/plugins/advanced-custom-fields-pro/forms/post.php:315
    acf_form_post->render_meta_box()
    wp-admin/includes/template.php:1037
    do_meta_boxes()
    wp-admin/edit-form-advanced.php:693 Plugin: advanced-custom-fields-pro
    Invalid argument supplied for foreach() 1 wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php:284 acf_field_repeater->render_field()
    wp-includes/plugin.php:525
    do_action(‘acf/render_field/type=repeater’)
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:451
    acf_render_field()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:604
    acf_render_field_wrap()
    wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php:341
    acf_field_repeater->render_field()
    wp-includes/plugin.php:525
    do_action(‘acf/render_field/type=repeater’)
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:451
    acf_render_field()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:604
    acf_render_field_wrap()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:415
    acf_render_fields()
    wp-content/plugins/advanced-custom-fields-pro/forms/post.php:315
    acf_form_post->render_meta_box()
    wp-admin/includes/template.php:1037
    do_meta_boxes()
    wp-admin/edit-form-advanced.php:693

    Also, a PHP notice:
    acf_field_repeater->render_field()
    wp-includes/plugin.php:525
    do_action(‘acf/render_field/type=repeater’)
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:451
    acf_render_field()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:604
    acf_render_field_wrap()
    wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php:341
    acf_field_repeater->render_field()
    wp-includes/plugin.php:525
    do_action(‘acf/render_field/type=repeater’)
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:451
    acf_render_field()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:604
    acf_render_field_wrap()
    wp-content/plugins/advanced-custom-fields-pro/api/api-field.php:415
    acf_render_fields()
    wp-content/plugins/advanced-custom-fields-pro/forms/post.php:315
    acf_form_post->render_meta_box()
    wp-admin/includes/template.php:1037
    do_meta_boxes()
    wp-admin/edit-form-advanced.php:693

  • OK, some more info – it seems that it is related to having a “accordion tab” field inside the repeater. I’m using such a structure all the time, so I don’t know why there is a problem now

  • 1. seems so
    2. It also seems that other stuff that I’ve been using for quite a while with no change has distorted in display now

    I can send you screenshots and the configuration I’m using

  • Screenshots might help, but I have the felling this is due to changes in ACF the third party plugins have not kept up with.

    The problems could also be a compatibility issue with PHP7, was this update recent? This could also be the cause of some issues, but I don’t know since I don’t have any sites running on 7. As far as I know ACF works and plays well with PHP 7, at least that’s what I’m told by people that have tried it.

    The first thing you’re going to need to do is to disable other plugins and see if the errors still exist or if they go away, maybe change themes as well.

  • 1. Well, yes, the update to PHP 7 is quite recent (maybe 7-10 days)
    2. I can change back to 5.6 and see if that changes
    3. I thought the accordion in the “PRO” version is maintained by ACF team.. I didn’t install it separately

  • The accordion tab plugin is separate and maintained by a different developer than ACF. It seems well maintained so I think if it’s the problem. There’s no accordion type of field built into ACF, at least not that I know of, so I don’t know how you’d have it installed without installing it separately, but it is listed on the add-ons page.

  • Oh, yes, you’re right, it is installed, but I somehow thought it is part of ACF, because

    Anyway, I’ll update on the PHP 5.6 vs PHP 7 thing soon

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

The topic ‘PHP Error on Pro (latest), custom post type’ is closed to new replies.