Home Forums Backend Issues (wp-admin) Custom fields missing after upgrade


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')): ?>
    						<tr cellpadding="10">
    							<th><?php the_field('lot_type'); ?></th>
    							<th><?php the_field('lot_pricebuilder'); ?></th>
    							<?php if (get_field('lot_expiry') == "True") {
    								echo "<th>Expiry</th>";
    					<?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>
    							<?php if (get_field('lot_pricebuilder') == "Builder") {
    									if (get_sub_field('lot_builder') == "null") {
    										echo "&nbsp;";
    									} else {
    								} elseif (get_field('lot_pricebuilder') == "Price") {
    									if ($sold == "Sold") {
    										echo "-";
    									} else {
    						<?php $avail = get_sub_field('lot_availability'); if ($avail == 'null' ) { } elseif ($avail) { echo $avail; } ?>
    						<?php if (get_field('lot_expiry') == "True") {
    							echo "<td><span style=font-size:11px>";
    							echo "</span></td>";
    					<?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:

    I hope this helps 🙂

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

The topic ‘Custom fields missing after upgrade’ is closed to new replies.