It’s been like this a long time, but tested with 5.4.4.
ACF5, not ACF4, though I suspect it affects both.
Hi John,
That’s not the issue for me.
Have debugged further and can 100% confirm ACF + WP4.6 is working different to ACF + WP4.5.3 in a way that is breaking other plugins.
Here is a completely minimal test case. Install a brand new version of WP4.6 and WP4.5.3, activating ACF.
Also install this extremely minimal plugin: http://www.cre8d-design.com/testplugin.zip . All this does is add a test javascript file to the mce_external_plugins filter which alerts the tinyMCE active editor when loaded.
Edit the Hello World post.
In 4.5.3, the test js file will alert “no active editor”. In 4.6, it will alert “acf_content”.
Any plugin which uses tinyMCE.activeEditor in this way is therefore going to change behavior and likely break, like EasyRecipe and other plugins mentioned above.
WP4.6 had a tinymce related update which may or may not be relevant: https://make.wordpress.org/core/2016/07/29/editor-changes-in-4-6/
A quick debug is showing EasyRecipe is using tinyMCE.activeEditor which is being set to acf_content instead of the main editor.
Looks like this is affecting a number of other plugins too all of which are trying to come up with workarounds, but it seems ACF is the problem:
https://github.com/dsifford/academic-bloggers-toolkit/issues/115
https://wordpress.org/support/topic/tinymce-problem-when-acf-and-abt-plugins-are-active?replies=5
Note this happens with no custom fields set up at all – replicated locally just with both plugins installed, and a recipe inserted into the content. Refresh and you’ll see the error.
Given this prevents posts from saving at all, a quick fix would be appreciated 🙂 (It could be an issue in the other plugin, but..)
I am having similar issues when ACF Pro and the EasyRecipe plugin is installed. Loading the Visual editor for a post with a recipe inserted is giving the same error message as above, breaking lots of things on the page from working properly (including saving the post at all).
Disabling *either* plugin removes the error.
This just happened after the WP4.6 upgrade.
So does nobody actually use the gallery field in reality? This major bug makes it far too hard for any of our clients to use, so I have to avoid it and use a repeater field every time..
It’s been a while but I never heard anything back from the support ticket. Every time I want a group of images I’m having to use a repeater field since drag and drop in the gallery is broken – any chance in bumping this up the priority list?
Thanks, have done so.
It’s because of the way:
.acf-gallery-attachment:nth-child(5n+1)
is set to clear:left
– when I start dragging, an extra element gets added, so the wrong one gets cleared.
That doesn’t seem to have helped I’m afraid. Seems dragging any item causes something to shift onto the next row.
I can’t seem to find this setting anywhere in 5.2.8 – where is it meant to appear?
While this will be hopefully be fixed/improved due to the autoloading options, if you have templates fetching a huge number of options fields like this you can build a caching system yourself – hook into the edit_category (or similar) filters; fetch all of the relevant fields for the page and cache them in an array in a single autoloaded option. That way all of the queries only need to be run when saving/creating/deleting a category, rather than on the frontend.
Bump. Custom fields stored as options are still generating multiple SQL queries per get_field call due to the lack of autoload which is very bad.
If a per-option setting isn’t possible, then the plugin should go back to defaulting to autoload.
Another person with the same request: http://support.advancedcustomfields.com/forums/topic/options-as-autoload-true/
Thinking about it some more, ideally people with add-ons enabled shouldn’t be able to upgrade in the first place, rather than upgrading then finding then need to downgrade.
I see your Pro version has a message saying automatic updates are disabled if you haven’t entered a license key. Could you release a 4.x update a while before the 5 release which disable updates if add-ons are enabled?
It obviously couldn’t work in the same way due to the way one is on the WP repository and one isn’t, but I think you can prevent an upgrade with the site_transient_update_plugin filter..
(People upgrading directly from an earlier version to 5.x would still need the message to downgrade of course, but it’s people doing regular upgrades who would be most inconvenienced anyway.)
Thirded. As a temporary fix, you can use the following in functions.php:
add_filter('admin_head','textarea_temp_fix');
function textarea_temp_fix() {
echo '<style type="text/css">.acf_postbox .field textarea {min-height:0 !important;}</style>';
}
About 90 something. For high performance sites it’s crucial to make sure things scale up well (even if the whole page is cached anyway), so at least I can work around the issue from the front-end side.
The code required to improve the performance in the backend is very simple – if I wrote it up could it be added then? Or are there other reasons it couldn’t be included?
OK, it looks like when the Text editor is selected, tinyMCE.activeEditor returns an ACF settings editor. Adding:
&& ed.id=='content'
to the Ziplist code seems to work – though is that the best option in general?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.