Home › Forums › Backend Issues (wp-admin) › Custom fields missing after upgrade
I recently upgraded to 5.5.0 and now my fields are missing. They aren’t present in the ACF admin UI, nor do the contents show up rendered on the pages.
The information still looks to be there in the database (wp_acf_fields shows a lot of familiar names), so I hope it can be recovered somehow.
I suspect that the database didn’t upgrade properly. Is there a way to check if ACF is using the new or old database structure?
I looked in wp_post meta and found some ACF field entries, so the data appears to be intact.
Also, my theme uses an if(get_field()) to conditionally display the ACF content, including static headers.
The weird thing is that the headers are displaying (so get_field must be resolving as true), and yet none of the content actually shows up. Here’s a code snippet:
<?php if(get_field('lot')): ?>
<h2>Pricing</h2>
<table>
<tr cellpadding="10">
<th>BLK</th>
<th>Lot</th>
<th><?php the_field('lot_type'); ?></th>
<th><?php the_field('lot_pricebuilder'); ?></th>
<th>Avail</th>
<?php if (get_field('lot_expiry') == "True") {
echo "<th>Expiry</th>";
}?>
</tr>
<?php while(the_repeater_field('lot')): ?>
<?php $sold = get_sub_field('lot_availability');?>
<tr <?php echo "class="; the_sub_field('lot_availability');?>>
<td><?php the_sub_field('lot_block'); ?></td>
<td><?php the_sub_field('lot_number'); ?></td>
<td><?php the_sub_field('lot_size'); ?></td>
<td>
<?php if (get_field('lot_pricebuilder') == "Builder") {
if (get_sub_field('lot_builder') == "null") {
echo " ";
} else {
the_sub_field('lot_builder');
}
} elseif (get_field('lot_pricebuilder') == "Price") {
if ($sold == "Sold") {
echo "-";
} else {
the_sub_field('lot_price');
}
}
?>
</td>
<td>
<?php $avail = get_sub_field('lot_availability'); if ($avail == 'null' ) { } elseif ($avail) { echo $avail; } ?>
</td>
<?php if (get_field('lot_expiry') == "True") {
echo "<td><span style=font-size:11px>";
the_sub_field('lot_expirydate');
echo "</span></td>";
}?>
</tr>
<?php endwhile; ?>
<?php endif; ?>
and yet it renders out as:
Hi @convoke
It seems you are still using the old the_repeater_field()
function. Please keep in mind that this function has been deprecated since v3.3.4. Kindly use the have_rows() function instead. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/repeater/.
I hope this helps 🙂
The topic ‘Custom fields missing after upgrade’ is closed to new replies.
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.