Closed gavin310 closed 4 years ago
hmm, I just tested it with acf 5.9.0 and wp v5.5 and 5.5.1 and everything seems to be working fine. Could you try to deactivate all other plugins (except acf and maybe classic editor) and see if this helps? Or maybe the update to wp v 5.5.1 helps? Or have any other additional info, what your setup is so we can try to find the problem?
Thanks for the response. Disabling all plugins besides ACF, ACF-autosize, and the Classic Editor didn't have any affect. I changed theme as well to the TwentyTwenty theme and upgraded to WordPress 5.5.1 and autosize still doesn't work. I'm using the plugin with the acf-autosize/enabledByDefault
filter to prevent autosize by default (I add the autosize
class when needed), but removing that filter has no affect either. The data-wysiwyg-slug
attribute is also not being added to the iframe.
I'm using the exact same code in a different project I'm working on, which is WordPress 5.4.2, and autosize is working as expected. Please be aware that autosize was working correctly in all of these projects until I upgraded to WordPress 5.5.
Perhaps it's a PHP issue. I'll try to look into this further.
I debugged this a bit and it's not enqueueing the javascript or css. The enqueue()
function is being called correctly and I can echo out text from this function, but the scripts and styles are never output to the frontend. If I change add_action('acf/input/admin_footer', array($this, "enqueue"));
to just add_action('admin_footer', array($this, "enqueue"));
the scripts and styles are included correctly. I'm not skilled with plugin development enough to figure out why the scripts aren't enqueued when using ACF's admin_footer
action.
I debugged this a bit and it's not enqueueing the javascript or css.
That would totally explain the issues that you are experiencing. But I still have absolutely no idea why the action is not firing in your setup. I also tested the regular and the pro version of acf but no luck reproducing the error.
I take it back. I now have a working setup where the plugin doesn't work anymore. I'll have a look into it and try to find a solution.
That's great. I have been experiencing the same issue with a number of my updated sites. Though, sometimes it was with earlier versions of WordPress (pre-5.5), but the latest ACF Pro.
okay, so it seems like the problem is that acf fundamentally changed the way they handle their admin_footer hook. I just released a new version that implements @gavin310 s solution, which is kind of the easiest way. Thanks for the feedback!
@hoffmannclaus Thank you so much for the quick fix, and thanks for the great plugin! ACF really should implement your code into ACF.
Thanks so much to you both. I agree with @gavin310!
I've been using the plugin successfully on all my projects lately (thanks!!!). Everything has worked great, but now with the latest version of WordPress (v5.5) and ACF (v5.9.0) the plugin has no effect.