Code Monkey home page Code Monkey logo

Comments (14)

elliotcondon avatar elliotcondon commented on June 5, 2024 11

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.

kyuumeitai avatar kyuumeitai commented on June 5, 2024 3

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.

joachimguido avatar joachimguido commented on June 5, 2024 3

@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.

Jotswana avatar Jotswana commented on June 5, 2024

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.

kubajjz avatar kubajjz commented on June 5, 2024

Thanks for this great plugin and please fix it...

from acf-image-crop.

fhfournier avatar fhfournier commented on June 5, 2024

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.

gummiforweb avatar gummiforweb commented on June 5, 2024

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.

fhfournier avatar fhfournier commented on June 5, 2024

Thanks @joachimguido!!!! Minor change and work great until the update !

from acf-image-crop.

wearehyphen avatar wearehyphen commented on June 5, 2024

Thanks @joachimguido — worked a treat! Saves having to downgrade and lose features until the plugin is formally updated 👍

from acf-image-crop.

andersthorborg avatar andersthorborg commented on June 5, 2024

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.

garyconstable avatar garyconstable commented on June 5, 2024

Hello, This has not fixed the issue for me, any ideas on what to do?

from acf-image-crop.

cdeVision avatar cdeVision commented on June 5, 2024

maybe your caching the old plugin files? Try clearing cache.

from acf-image-crop.

garyconstable avatar garyconstable commented on June 5, 2024

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.

cdeVision avatar cdeVision commented on June 5, 2024

I thought it might have been your browser caching files.

from acf-image-crop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.