-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken in ACF 5.5.5 #42
Comments
I can confirm this behavior as well. With debug on, I receive this error:
However, downgrading to ACF 5.5.3 resolves the issues for me. I realize this doesn't help determine the origin of the issue, but some conflict exists as a result. No errors in the logs. |
Getting the same error as @jomurgel |
Some more detail on this issue: My setup is: There's a validation error in ACF Pro when the post is saved:
What seems to be happening is that ACF expects the image to be an object at this stage of validation (with a 'url' attribute), but ACF Image Crop is returning an attachment ID JSON for evaluation in this function, so validation basically doesn't happen and we get a bug error. It looks like in addition to the update_value() child function in 24745e3 we'll need to validate proper Image Crop field JSON with a child function of validate_value() for Image Crop type fields. I threw this into acf-image-crop-v5.php as a test and the notice goes away -- but of course now JSON isn't being validated at all! I'm not sure of all the potential cases here so I'm not sure that I can write a full pull request, but here's a stub to get the issue started if anyone is clearer on what needs to be validated:
|
This is still broken. Is there any news on this? ACF 5.5.10 |
works fine for me after the last update. |
so i've put together a little filter for this. here it is:
it's been tested on WP 4.7.3 with ACF Pro 5.5.10 and the latest version of this plugin (1.4.10) |
@jessekahner Thanks for the patch. It works :) UPDATE: After applying the patch I'm getting WP 4.7.3, ACF PRO 5.5.10, ACF Image crop 1.4.10 UPDATE 2: here's my hacky fix based on @jessekahner's work. Feel free to update it :)
|
After updating to 5.5.5, I am no longer able to save image fields with this plug-in.
I have the field loaded on an options page.
I select, and image, crop it, and save the page.
The page reloads without the image, and it is not saved to the database.
Same if I do not crop it.
Using the standard image field works fine.
The text was updated successfully, but these errors were encountered: