0

First I must apologize as I am only using WordPress out of necessity and so may not be very well versed in the proper terminology.

I have a site where WordPress serves mainly as a CMS for a pair of pages (one of said pages is a list of open positions, for example). I have noticed that, occasionally, some of the data on said pages disappears on unrelated edits in a manner that is not trackable via the page revisions (and thus very hard to restore).

For example, here is an FAQ I have on the site:

FAQ

It is backed up by a list of items:

Items

Ocassionally, when I change other things, some/all of the answer paragraphs go blank. Is there any way to make the page revisions track changes inside each item? Currently, it only tracks the total amount of items, but is completely oblivious to the changes inside the item (I'll see there was a revision, but the diff shows nothing).

I'll gladly divulge any additional information required. Thanks.

3

Looking at the second screenshot, it seems like the question and answer fields are generated by the Advanced Custom Fields (ACF) Plugin with Repeater add-on. The symptom that only the item number is tracked, but not the item contents, reinforces this assumption. The ACF Plugin can either be installed as a plugin, but I think the necessary code can also be included directly in a theme.

As ACF saves the data in post meta, you should try the feature plugin WP-Post-Meta-Revisions. This plugin was made to bring post meta changes into revisions.

About the problem of disappearing content in you repeater fields: This could be because of limitations in your server config. If you are having many fields, you are probably hitting the input vars limit. Most configurations set max_input_vars to someting like 1000. Increasing this with php_value max_input_vars 5000 in your .htaccess file should help then. There is a thread about this in the ACF Support Forum

  • Thank you very much for the answer! It didn't occur to me that the ACF plugin had anything to do with those fields (this entire thing was outsourced). Once I see you did indeed hit the nail on the head I'll be sure to tick your answer. – Aubergine Nov 9 '16 at 14:50
  • Reading quite a bit about this on the ACF forums, it seems that using the plugin you suggested along with ACF is a bad idea. Specifically, ACF is supposed to take care of revisions on its own when editing things through WordPress's admin interface. Not to mention that using said plugin with repeater fields is... challenging (as the field named are auto-generated). I've opened up a ticket with ACF's support and will be sure to update this question if I discover anything useful. – Aubergine Nov 16 '16 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.