Support

Account

Home Forums Backend Issues (wp-admin) ACF Local JSON "Awaiting Save"?

Solving

ACF Local JSON "Awaiting Save"?

  • Hi there, I just noticed today, that my field groups don’t sync to my theme’s acf-json folder anymore. On the far right column (“Local JSON”) on my edit.php?post_type=acf-field-group screen, it says in gray letters “Awaiting Save”.

    Sounds fancy, but I would love to get back the “Immediate Save”-feature 😉

  • It could be that your acf-json folder is no longer writable, that’s about the only thing I can think of.

  • This question ranks highly in the search engine, so I would like to share a method how resolve field groups being stuck on “Awaiting Save”.

    1. From Field Groups > Tools, export all field groups as JSON to my Downloads folder.
    2. Trash all field groups. I also deleted all field groups permanently, but this may be unnecessary.
    3. Delete all stray JSON in the /acf-json folder.
    4. Import the JSON file.

    How I think it happened
    At first, I told ACF to save JSON to a theme subfolder: get_stylesheet_directory() . /acf-json. Next, I added two new field groups and saved them. However, later on I changed my mind, and added a second, conflicting PHP file, which told ACF to save local JSON to /mu-plugins/acf-json. However, I forgot to create the /mu-plugins/acf-json folder, which meant I was telling ACF to write JSON somewhere non-writable: a directory which didn’t exist.

    A couple weeks pass before I get to work this project again. I had not though much about the local JSON, until I was ready to commit the finished field group. However, I noticed that updates to the field groups were no longer showing in the version control panel in Visual Studio Code. After digging around in the theme and the mu-plugins folder, I deleted the second, conflicting PHP file. Nevertheless, even after removing the reference to the non-existent folder, ACF was not able to save local JSON to the theme. All field groups, even brand-new ones, were stuck at “Awaiting Save”. It seemed like the only way to save the field groups would be to start over: export to JSON, delete all, then import from JSON.

  • I have the same problem. Loading field groups works, but saving them doesn’t. The permissions of the directory are not the issue.

  • Permissions are not the issue. I inherited a WP project already using ACF Pro where the fields weren’t saved as JSON. Using Sage theme, ACF typically knows where to find the acf-json directory. In this case, it didn’t. I also tried adding the WP filter to specify the location of the acf-json directory, and while it saves the field groups as json files into the acf-json directory, I still get “Awaiting Save” next to all my field groups.


    @hdevilbiss
    thank you, but that still didn’t work for me. I started from scratch without importing any JSON files, created a new field group, ticked the box to save as JSON, and still got “Awaiting Save” even though the JSON file has been save to the acf-json directory.

    `
    add_filter(‘acf/settings/save_json’, __NAMESPACE__ . ‘\\my_acf_json_save_point’);

    function my_acf_json_save_point( $path ) {
    // update path
    $path = get_stylesheet_directory() . ‘/resources/acf-json’;
    // return
    return $path;
    }
    `

  • Same here…any suggestion?

  • Hey, I just wanted to share what solved it for me. I tried updating the file and folder permissions on the staging server, downloading and comparing the json files and then I went to the actual field group that had “awaiting save” and opened it to edit it and hit save and the “awaiting save” disappeared.

    So it was…actually just awaiting a save – nothing as complicated as we were all trying to solve for.

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

You must be logged in to reply to this topic.