Home › Forums › Add-ons › Repeater Field › Issues With have_rows & Repeater
Hello, a current project was running along fine with the fields not being exported. However, once I exported the fields I could no longer get the repeater fields to display data. The array returns empty, I can’t get anything to echo inside the have_rows() function…it all seems to be broken after exporting to a PHP file.
I confirmed by re-importing the JSON file and the fields are sorted fine again. Any thoughts?
That is weird. Did it only affect the repeater field? Did you delete the fields when you use the PHP code? It’s possible that there’s a conflict between the old field group and the PHP code. Please make sure that you’ve deleted the field group from the trash too.
If still no joy, could you please share the PHP export code so I can test it out in my installation?
Yup, I deleted the old fields in the admin when testing. I’m wondering if I didn’t get sloppy & use too generic names? At any rate, I’ll send a private reply with the attachment next. Thanks!!
I’m afraid you forgot to attach the PHP file or there’s something wrong with the forum attachment. Could you please upload it to somewhere else?
Also, could you please make sure that you didn’t use the local JSON feature? This page should give you more idea about it: https://www.advancedcustomfields.com/resources/local-json/.
Yeah, I didn’t use the local JSON feature. I tried that but wasn’t having any success so I abandon it for just including the PHP file. Not related to this thread but I can never seem to get the local JSON feature to work from inside a plugin so I just end up going with the PHP INCLUDE.
I’ve just tested the PHP export but couldn’t reproduce the issue. It’s possible that there is something wrong with your site setup. Could you please provide me with temporary admin credentials so I can check the issue for you? You can share it by setting the post visibility to “Private”.
Also, if you could create a staging site for the testing, that would be great!
You must be logged in to reply to this topic.
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.