Support

Account

Home Forums Bug Reports ACF Front End Form taxonomy field "Loading Failed" in production only

Solved

ACF Front End Form taxonomy field "Loading Failed" in production only

  • Hello there,

    First, I use ACF PRO 5.11.4 and the latest WordPress 5.8.3

    I’m wondering why the taxonomy fields doesn’t work in my ACF front end form.
    Everything runs fine in localhost (Wamp).
    Then I tried in production environment with 2 different webhosts and I get the same error message “Loading failed“.

    It’s the exact same site in localhost and production.
    No error in DEBUG mode (WP_DEBUG, WP_DEBUG_LOG and SCRIPT_DEBUG).
    I tried with all plugins disabled except ACF PRO.
    The same scripts are well loading in the same order in local and prod when I look at in in the console.

    Seriously I think there is a parameter to change at my webhost but I don’t know what.
    ANd it seems to be a general problem with most of webhost.

    Do you have an idea ?

  • Ok it’s weird because it works fine if I choose to display it as Radio buttons instead of Dropdown list.
    See attached image please.

  • When using a select field for taxonomy fields it uses Select2. An AJAX request is done to get the terms. If loading fails it means that the AJAX request is returning something other than what is expected. This could be because of an error on the server or it could be caused by some output that should not be happening.

    If you add custom JS you can inspect the ajax data before and after the request and this might lead you to what the issue might be https://www.advancedcustomfields.com/resources/javascript-api/#filters-select2_ajax_data

  • Thanks John.

    So I made it works as Dropdown List, do you know how ?

    I saved my Taxonomy field as Radio Button (that works).
    Then re-saved my Taxonomy field as Dropdown List and tadaaa! Works fine.

    I don’t explain why. Previously I saved multiple times the field Taxonomy field without changing the Dropdown List setting and it was not solving the problem.
    But switching to radio button -> Save, then choose Dropdown -> Save make it works.

  • I haven’t got a clue what could make it work by changing it and then changing it back.

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

You must be logged in to reply to this topic.