Support

Account

Home Forums Bug Reports No error in case of unwriteable acf-json directory

Solving

No error in case of unwriteable acf-json directory

    • wube

    • December 12, 2015 at 4:51 am

    When wrong permissions are set to acf-json directory then no error is shown when saving the field group. After the group is saved all the fields looks like updated, so I assume that they’re saved in the database when acf-json dir is not writeable. That’s OK, but there should be at least a warning saying that acf-json directory exists but it’s not writeable.

  • I’ll mark this for the developer to take a look at if he has time.

    I’d call this a feature request and not a bug. Looking at the code it appears to be working as intended.

    Before attempting to write a file ACF does not test to see if the folder exists and if it’s writable separately, it test to see if it’s writable which has a side effect of also testing if it exists.

    The getting started section of this page gives information on setting up the folder which includes the permissions that are required http://www.advancedcustomfields.com/resources/local-json/#getting-started

    • wube

    • December 18, 2015 at 2:55 am

    I know it works like it was meant to work, but IMO it’s not a proper way.

    I know that ACF JSON directory should be writeable and ACF documentation says about it.

    I found this “bug” because the server configuration was wrong. It was OK on my local environment, but didn’t work on production. So it was a bit confusing and it wasn’t so obvious that ACF JSON directory is not writeable. I spent some time to figure it out.

    IMO there should be a notice displayed, at least, when WP_DEBUG is set to true.

  • Like I said, I marked this topic for the developer to take a look at. He may very well agree with you and make the change, I can’t say. I also don’t know when he’ll look at this.

    • wube

    • December 22, 2015 at 11:18 am

    Thanks.

    • v3nt

    • September 6, 2019 at 12:40 am

    any update on this or what permissions need to be set for saving json to work? Constantly having issues with ace json locally and on servers. Seems to work quite randomly

Viewing 7 posts - 1 through 7 (of 7 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.