Home › Forums › Bug Reports › oEmbed field does not work in a new Group field › Reply To: oEmbed field does not work in a new Group field
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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.