Support Forum

Welcome to the Support forum.

New Discussion can be made between Monday and Friday (AEST). Comments are never disabled.

Thanks, Elliot

Current status: Unsolved. . Done
Bug Fix for Taxonomies and Revisions [Solved]
  • I have found a bug in the handling of revisions in ACF. This came to light when using the Taxonomy plugin, which was failing to apply terms to the post when its Set Post Terms option was enabled. Others suggested that disabling Wordpress revisions was a workaround, and in doing more digging, I found a solution by modifying the ACF core.

    ACF seems to be aware that when a post is amended with revisions enabled, that the save_post action gets called twice, once for the revision and once for the parent post. The logic employed in ACF to deal with this was too primitive, and meant that terms being added to the post taxonomies were not being applied correctly.

    Two files contain the same error in logic.

    advanced-custom-fields/core/controllers/input.php, starting line 402

    advanced-custom-fields/core/controllers/field-group.php, starting line 501

    Detail on the fix can be found in the Taxonomy field's support forums on Github, follow this link:

    https://github.com/GCX/acf-taxonomy-field/issues/11#issuecomment-7152662

    Hopefully this fix can be rolled into the next ACF release.
  • Very interesting...

    This is a great shine of light on that issue. I'll do some local testing and roll this out!

    Thank you very much
  • Hi dmeehan1968,

    Thanks again for this code fix. I've added it to my current 3.3.4 dev and looks very stable.

    Cheers
    Elliot