Home › Forums › General Issues › ACF warning messages appear in frontend › Reply To: ACF warning messages appear in frontend
I don’t know.
This is what I do know. The error in your OP is happening on a line where elementor Pro is getting a value for from the ACF field using the ACF function get_field(). This is returning no value. The only thing that will cause this is if the field does not exist or get_field() is called before ACF in initialized.
here is the line in elementor pro
list( $field, $meta_key ) = Module::get_tag_value_field( $this );
the php function expects that the value on the right of the = is a non empty array. Here is the function being called.
// For use by ACF tags
public static function get_tag_value_field( Base_Tag $tag ) {
$key = $tag->get_settings( 'key' );
if ( ! empty( $key ) ) {
list( $field_key, $meta_key ) = explode( ':', $key );
$document = Plugin::elementor()->documents->get_current();
if ( 'options' === $field_key ) {
$field = get_field_object( $meta_key, $field_key );
} elseif ( ! empty( $document ) && 'loop-item' == $document::get_type() ) {
$field = get_field_object( $field_key, get_the_ID() );
} else {
$field = get_field_object( $field_key, get_queried_object() );
}
return [ $field, $meta_key ];
}
return [];
}
I’m guessing that this function is failing to get the ACF field object and returning an empty array. There isn’t
Is it possible that you have a field set in an element widget that no longer exists?
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.