• Resolved dgrayman

    (@dgrayman)


    Im getting error in using the flexible field, this probably because of using the clone field??

    \wp-includes\class-wp-hook.php(324): _acfe_flexible_render_layout_template_after(Array, ‘grid_01’, false)
    wp-includes\plugin.php(517): WP_Hook->do_action(Array)
    \wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
    wp-content\plugins\acf-extended\includes\acfe-template-functions.php on line 221

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    This issue may happen if you edit the $field or $layout variables inside your layouts templates.

    Few variables are set as global within the Flexible Content so they are available in Layouts PHP Templates: $layout$field and $is_preview.

    Since these variables are global, it means that if you edit them, the changes will propagate to the rest of the code. Looking at your error report, this is probably what happen as the $layout array has been modified and becomes grid_01, here:

    _acfe_flexible_render_layout_template_after(Array, 'grid_01', false)
    ^
    $layout here should be an array

    While it looks like is new a new issue, it was in fact already present in the previous 0.9.0.9 version. The $layout array is used by the following hooks (and their variations). See documentation.

    action('acfe/flexible/render/before_template', $field, $layout, $is_preview);
    action('acfe/flexible/render/after_template', $field, $layout, $is_preview);

    In the previous version, if you didn’t use these hooks you probably didn’t notice the $layout became grid_01, so it was imperceivable. But in the latest 0.9.1 patch, these hooks are now used internally by ACF Extended itself to perform some additional operations, and it requires to have the correct $layout array. This is why it nows throws an error.

    I would recommend to check your layouts PHP templates, and make sure you don’t change the $field or $layout variables. If you do, please use another variable name, like $layout_name for example, to make sure $layout is intact.

    Hope it helps!

    Have a nice day!

    Regards.

    Thread Starter dgrayman

    (@dgrayman)

    replaced $field and $layout

    cool, yeah it works, thank you so much

    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    I’m glad to hear it now works as expected!

    Have a nice day!

    Regards.

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

The topic ‘0.9.1 Issue’ is closed to new replies.