Comments (14)
Hi guys,
Elliot here from ACF. My apologies for the recent issue triggered in 5.6.0
My intention was never to harm 3rd party field types, in fact, it was the complete opposite.
I discovered that due to the previous setup, it was not possible to ''extend' core ACF field types using the standard parent::__construct();
method.
I did not realize that some 3rd party field types were calling the acf_field::__construct();
directly as a work around - great thinking from the devs.
I believe a simple fix exists! Add an empty initialize
function to the field class. Eg. Add this to the acf-image-crop-v5.php file:
function initialize() {
/* do nothing */
}
This should prevent the core class over-writing the child class.
Please let me know if this solves the issue, and I will be sure to contact everyone involved.
Cheers
Elliot
from acf-image-crop.
Hi all.
I've made a test, printing the $field in the format_value function (line 939)
Interestingly enough, with ACF 5.5.14 it prints only the $field with the [type] => image_crop
In 5.6.0. prints all the [type] => image
, this is why there's so many warnings for missing properties.
I'll keep looking.
from acf-image-crop.
@gummiforweb I tried the method you explained in the blogpost on the ACF forum and it works!
I made the following changes in the acf-image-crop-v5.php file:
Changed:
function __construct()
to:
public function initialize()
and at the bottom of the function I deleted:
// do not delete! acf_field::__construct(); //parent::__construct();
WARNING: after making these changes, the plugin will no longer work on previous versions of ACF, so it's just for those who need it now for ACF 5.6 and up
from acf-image-crop.
First of all. Thank you for the Plufgin. We encountered the same Problem here.
The entered fields don't exist anymore after the update of ACF. Neither in ACF (we use the Pro Version) nor in the frontend. An update on this would be great.
from acf-image-crop.
Thanks for this great plugin and please fix it...
from acf-image-crop.
Yes thanks for this plugin! I really need this update :-) and also the option in backend is not there. I have all other option but can't see "acf Crop" when editing acf
from acf-image-crop.
Hi,
The reason why 5.6 prints all [type] => image is because they way a custom field registered is different.
here's some info, hope it helps. https://support.advancedcustomfields.com/forums/topic/acf-pro-5-6-update-restructured-plugin-files/
from acf-image-crop.
Thanks @joachimguido!!!! Minor change and work great until the update !
from acf-image-crop.
Thanks @joachimguido — worked a treat! Saves having to downgrade and lose features until the plugin is formally updated 👍
from acf-image-crop.
Hi guys,
The issue should be resolved by cd3f55a.
Thanks for taking action and thanks @elliotcondon for taking time to deal with 3rd party compatibility.
from acf-image-crop.
Hello, This has not fixed the issue for me, any ideas on what to do?
from acf-image-crop.
maybe your caching the old plugin files? Try clearing cache.
from acf-image-crop.
I cleared the cache using W3 Total Cache plugin - there was no change are there some files that I can manually delete ?
thanks.
from acf-image-crop.
I thought it might have been your browser caching files.
from acf-image-crop.
Related Issues (20)
- Broken in latest update - 1.4.12 HOT 1
- Broken with ACF 5.6.1 Update HOT 4
- Update action broke the whole site HOT 2
- Image Object Selectable with Save cropped image in media library set to No
- Compatibility with translate.wordpress.org HOT 1
- Needs polishing in WP 4.8.1 + check compatibility with ACF Pro gallery field
- Add min/max size
- WP_Error::set_quality() HOT 5
- Edit cropped image shows modal with empty & missing fields HOT 4
- Large pic field images have been scaled down automatically to 678x300px
- Not an issue: wordpress responsive image sizes HOT 1
- Error in crop area position. HOT 2
- ACF Pro 5.7-RC1 - Cannot choose image HOT 2
- Still Maintained? HOT 2
- Plugin conflict
- fix for missing metadata in cropped image
- Alternative > Advanced Custom Fields: Image Aspect Ratio Crop Field
- Not work whit graphql plugin
- Vulnerable to Broken Access Control
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-image-crop.