Support

Account

Home Forums ACF PRO Disable ACF-JSON auto generation

Solved

Disable ACF-JSON auto generation

  • Hi, as far as I can see, once you created an acf-json directory, ACF-PRO keeps always generating a json for a field group, even if you deleted the directory.

    Is there a way to tell ACF to stop that?

    I’m getting crazy with duplicates field groups.

    Thank you in advance

    • Elliot

    • July 14, 2014 at 11:39 am

    Hi @matteo Balocco

    ACF should not be saving field groups if the folder deosn’t exist…
    Perhaps there is a bug which I have not yet seen.

    You can disabled it completely like so:

    
    add_filter('acf/settings/json', '__return_false');
    

    Thanks
    E

  • This reply has been marked as private.
  • Tried that filter, but still json was created on my clients site.

    Edit: With above filter for acf/settings/json the data from json is not included in the post edit screen as expected.

    But with WPML plugin active, the json folder and files are still created because the settings_save_json filter in core/wpml.php always creates the json folder if it does not yet exist and due to this is_writable() in update_field_group in core/json.php will always return true.

    As a solution I would suggest to add the acf_get_setting('json') validation from include_fields also to update_field_group and delete_field_group in core/json.php.

    WP 3.8.3, ACF PRO 5.0.0, WPML 3.1.6

    • Elliot

    • July 28, 2014 at 2:57 pm

    Hi guys

    I’ve just fixed this issue and will be releasing v5.0.3 shortly.

    Cheers
    E

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.