Support

Account

Home Forums Backend Issues (wp-admin) Taxonomy Selection in Dropdown Causes Form to Disappear

Solving

Taxonomy Selection in Dropdown Causes Form to Disappear

  • I’m putting my hair out trying to debug this issue. It could be an incompatibility between the latest ACF and WP, or it could be my own dev issue. The only change I can tell is updating plugins/core. I’ve searched and have found a few other users with the same problem, but they were for previous versions and the resolution seemed to be “revert to previous version or wait for bug fix.” I’m not aware of any current issues, but I’m having the problem regardless.

    – I have a custom post type that has a few custom taxonomies as fields. (e.g., “Workshop Session” is the post type, and “Location” is a related taxonomy.
    – When I’m editing a post, everything is fine until I choose an item from a taxonomy dropdown. (1) I click on the dropdown, (2) it loads the data, and (3) I choose the one I want.
    – When I click on the taxonomy term that I want, an AJAX POST call is made with the “acf/ajax/check_screen” action. The server returns a valid response (200).
    – Then, the entire admin panel (“.acf-postbox”) containing the custom fields gets hidden as do all of my custom fields. Saving doesn’t preserve the modified data.

    I’m running:
    – Advanced Custom Fields v 5.7.6
    – WP v4.9.8
    – Running under Apache2 with PHP7.2 FPM.
    – Server is behind CloudFlare, but same error if I disable it.

    No errors show up in the logs (Apache, PHPFPM, nor in wp-content/wp-debug.log when I activate it). I’m seeing no errors in the browser console either. When I debug the AJAX call in the browser, I see this (no errors that I can tell):

    https://pastebin.com/5j7J2gqr

    Anyone?

  • More info: I’ve done some regression testing, and find that the error disappears if I revert to v5.7.3. 5.7.4, 5.7.5 and 5.7.6 all exhibit the same error. I noticed in the change log that 5.7.4 introduced some improvements in AJAX handling, which may be causing the incompatibility.

  • I am experiencing the same issue and reverting back does not seem to resolve the issue due to the ACF database update.

    Choosing a taxonomy causes the acf-postbox to gain the class acf-hidden.

  • I’m experiencing the same issue. Choosing any (custom) taxonomy causes the fields to gain ‘acf-hidden’.

    No WPML, WP 4.9.8, ACF PRO 5.7.6.

  • This issue seems to be happening again. Is there a solution?

  • @jeremy-moore1985 – I’m experiencing a “similar-but-different” issue on the latest release (v5.7.10). What’s happening for me is that, rather than the entire form disappearing, the select2 dropdown just reverts to blank when I make a selection. No javascript errors or anything.

    For me, the fix (for now, anyway) is to replace the plugin with the last known “good” version:

    https://downloads.wordpress.org/plugin/advanced-custom-fields.5.7.3.zip

  • i m experiencing the same issue with ACF 5.7.11 & wordpress 4.9.8

  • i just revert to ACF PRO 5.7.3 and the same issue is there. Whenever i touch any taxonomy field, my custom field group is disapearing.

  • Hi all,

    The issue sounds like ACF is incorrectly “re-adding” the field group metabox after a “post attribute change” is detected.

    This is possible if the field group is missing a “key” setting.
    If you are using PHP to register the field group, can you please check your PHP field group and ensure that the field group itself has a unique key?

  • i m not using PHP to declare those field, i m creating them through the UI. So how can i check ?

  • @pa-chiron

    Thanks for the reply. Can you please open a support ticket via the following link so we can further investigate the issue on your site? https://www.advancedcustomfields.com/contact/

  • I faced the same issue while adding the field group via PHP using the current_user action hook and generating the field value dynamically, based on the post_id.

    By its nature the AJAX call does not recognize the current_user action hook (and others). Switching to admin_init did the trick for me. The field group will then remain visible when assigning a taxonomy term.

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

The topic ‘Taxonomy Selection in Dropdown Causes Form to Disappear’ is closed to new replies.