3rd Party Custom Metabox Stop Working when Disabling ACF
-
I’ve had this issue for a long time now but never had a chance to look into it. As context, I don’t use ACF on any site but I have to enable it often when providing support to customers who are using the plugin.
The issue is that when ACF is disabled sometimes a custom metabox added by another plugin or the theme stops displaying. The only fix is to re-enable ACF or run a DB/PHP query that deletes all the user’s
meta-box-order_{post_type}
meta options.I haven’t dug through all your code yet, but what is happening is that the custom metabox that no longer works when disabling ACF has been saved in a custom $context named “acf_after_title” (instead of normal, aside, advanced) . So when ACF is disabled the metabox won’t show up.
Solution:
There isn’t a great solution to the issue. Because metabox ordering is saved on a per user basis if the website has thousands of users it may be quite resource intensive to delete all the user’s meta on plugin deactivation.
Ideally your plugin would not mess with metabox ordering at all or at least don’t register a custom location and assign non ACF metaboxes to it.
Thank you!
- You must be logged in to reply to this topic.