Home › Forums › Bug Reports › Bug ACF 5.2.0 – Custom Fields stop rendering › Reply To: Bug ACF 5.2.0 – Custom Fields stop rendering
For example, I have a custom post type that displays a video. That video is also a custom post type with custom fields. In order to associate the video with the post, I have a field called ‘video’ that is a Post Object. That way, I can just pick the video in a list to display on that post.
When I upgraded the plugin, the videos just stops showing up. When I revert the plugin, they work again. Actually, anything using a Post Object field – which there are quite a bit (Sliders, featured items…).
With 5.1.8 this will return a Post Object:
$post = get_post(60); echo $post->post_title; $fields = get_fields(60); $video_post_object = $fields['video']; $field = get_field('video', 60); print_r($video_post_object); // WP_Post Object ( [ID] => 926 ... ) print_r($field);
In 5.2.X the video field is blank/null/whatever.
Field Name: video
Field Type: Post Object
Filter by Post Type: Video
Filter by Taxonomy: –
Allow Null? No
Select Multiple? No
Return Format: Post Object
Conditional Logic: No
Video is one example, but all Post Objects return null with get_field/get_fields.
I should also note, the field groups are currently being setup in the admin section under the Custom Fields tab – so ACF is driving all of this.
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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.