Home Forums Bug Reports oEmbed field does not work in a new Group field


oEmbed field does not work in a new Group field

  • In the backend – the oEmbed field does not work when part of a Group field (ACF PRO 5.6.0) – the oEmbed tool shows Error. No embed found for the given URL..

    If you move the same oEmbed field outside of the Group field, it works.

    Something to do with nested array value?

    If you manually enter the oEmbed URL into the DB table, the field renders both on backend and front-end so I suspect this points towards the backend ACF JS?

  • Upon further research, the problem originates with class-acf-field-oembed.php – function get_ajax_query()

    The Group Field key is passed through to acf_get_field which returns false.

    If you comment out:

    // load field
    $field = acf_get_field( $args['field_key'] );
    if( !$field ) return false;
    // prepare field to correct width and height
    $field = $this->prepare_field($field);

    and put in a temp array:

    $field = [
    'width' => 300,
    'height' => 280

    Then the oEmbed in a Group Field works correctly.

    So the issue is with acf_get_field not being able to handle a Group Field key.

  • As is always the way, after much previous confirming that there was in-fact an issue, I’ve come to work on the project this morning and it seems to be resolved.

    I have upgraded to 5.6.1 this morning, but reading through the updates I’m not sure that was the fix.

    As it stands, there is no longer a problem.

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

The topic ‘oEmbed field does not work in a new Group field’ is closed to new replies.