@ Jon
It doesn’t make any sense that changing the flag for for cached doesn’t work. That’s the only difference between showing the data in the frontend and the admin/edit form. Question, after you changed the cache flag, did you check while logged out or in? If you didn’t then you’re viewing the data with the same permission you have as in the admin; which means you would see all listed. That would be expected.
Another quick question … which version where you running that worked and which version did you update to where it stopped working? If you have that info, I could pull a diff and see what might have caused the issue to begin with. If you don’t know, no worries.
Bulk updating should be simple. You need to be on 0.7.9+ for this to work:
add_action( 'cn-loaded', 'cnBulkUpdate' );
function cnBulkUpdate() {
$results = $connections->retrieve->entries();
foreach ( $results as $row ) {
$entry = new cnEntry( $row );
$entry->update();
}
}
Dropping this in the theme’s functions.php file should do it.
A few words of caution…
I didn’t test the code, but there’s no reason it should not work.
IMPORTANT: Put your site in maint mode and sure no others are on the site before you add this code because it will run on every page load. That would be bad.
I would test with a single broken entry first to make sure it’s all good; like so:
add_action( 'cn-loaded', 'cnBulkUpdate' );
function cnBulkUpdate() {
// X == the entry ID to update.
$results = $connections->retrieve->entries( array( 'id' => X ) );
foreach ( $results as $row ) {
$entry = new cnEntry( $row );
$entry->update();
}
}
I would also suggest increasing the PHP memory and max exec time. What you have set now should be perfectly fine; but why chance it, right?
After you test on a couple and you’re satisfied that it worked. Go ahead and do them all. Don’t worry about excluding the ones you tested on.
Let me know how it goes.
