Support

Account

Home Forums Backend Issues (wp-admin) Field Groups, Location Rules: Ajax Bug

Solved

Field Groups, Location Rules: Ajax Bug

  • Dear Support Team,

    The following bug occurs on two levels:

    1st Level:

    – Meta Box of Field Groups set with a location rule of “User Role is equal to All” appears on non-user edit screens (Custom Post Type).

    – Meta Box of Field Groups set with a location rule of “Options Page is equal to Options” appears on non-options pages (Custom Post Type).

    2nd Level:

    – An attempt to edit location rule results in a duplication of the whole admin screen inside the field groups section as a manner of an AJAX script failure.

    Screencast:

    https://drive.google.com/file/d/0B-aDltT4Ji99S2J2NjQ2MUg5N1k/view?usp=sharing

    System information:
    – WP 4.8.2
    – ACF PRO 5.6.4

    – No JS Errors in the console

    – JS exceptions thrown when loading the edit screen: “[Violation] Added non-passive event listener to a scroll-blocking ‘touchstart’ event.”

    – JS exception thrown when changing the location rule’s main select box: “[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience.”

    Debugging attempts:

    – Disabled all of the WordPress plugins except for ACF. Didn’t help.

    – Uninstalled ACF, reinstalled from latest ZIP. Didn’t help.

    – Inspected all PHP error logs. No errors found.

    – Activated WP_DEBUG in wp_config.php. No errors found.

    Your quick help will be much appreciated.

  • Have you tried changing themes? I just did a test of everything and I did not experience any of the errors you list.

  • Update: I’ve found the cause of the issue.

    I had a filter function attached to the “script_loader_tag” hook that adds a “defer” attribute to all of the JS script tags. The filtering wasn’t limited to the frontend only and somehow interfered with ACF’s process of loading JS files in the backend.

    Once the filter has been limited to the frontend only, ACF’s functionality in the backend returned to normal.

    Thanks for your time John!

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

The topic ‘Field Groups, Location Rules: Ajax Bug’ is closed to new replies.