AdvancedCustomFields / AdvancedCustomFields/acf
Local JSON custom folder save/delete stopped working in 5.9.1
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm in process of upgrade my production server, and as usual I see the change log and test things on dev to see if anything breaks, found in your plugin this changelog:
Fix - Reverted Local JSON "save to source path" enhancement due to DX feedback.
Which leads me to this file/line: https://github.com/AdvancedCustomFields/acf/blob/70b15d50f3f2bf73e46e655e12cc8df511fb7d4e/includes/local-json.php#L205
So the problem is: When I edit a group field in ACF it doesn't update in my custom path, instead it creates/updates the file in themes/my-theme/acf-json. I have something like 10 plugins which rely on this feature now and it doesn't work anymore. They all use the "acf/settings/load_json" hook.
Tested with the old version (5.9.0) again and everything worked normally.
Why did you made this modification ? Should I just move everything to theme folder? The idea to maintain the ACF-JSON in the plugin folder seems the better option here because it makes portable. If you change the theme you lose the acf-json.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in includes/local-json.php around line 205 and compare the Local JSON behavior between versions 5.9.0 and 5.9.1. Reproduce a custom path configured through the acf/settings/load_json hook, then verify that editing a field group saves and deletes the JSON in that path rather than themes/my-theme/acf-json.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100