1.0.3x WP 5.x: lodash conflict? _.pluck is not a function
-
I’m having a really weird multi-plugin conflict with any version of Rank Math >1.0.28 (likely due to enhanced Gutenberg support). In the post editor, I keep getting the following error and am unable to edit posts due to the JS exception:
Uncaught TypeError: _.pluck is not a function
The instances that I’m having the conflict on are running WP 5.1.4/PHP 7.1.4, but I created a fresh WordPress install and was able to replicate it. The fresh install is base WordPress with no configuration changes, extra plugins (except for those noted below), and using the default Twenty Twenty theme:
- WordPress 5.3.2
- PHP 7.3.2
- Chrome 79 and Firefox 71.0, macOS Mojave 10.14.6
- Rank Math 1.0.36.3
Here is the combination of plugins that are causing the issue:
- Rank Math >~1.0.33
- Carbon Fields 3.1.8 (similar to ACF; also verified in the Composer version htmlburger/carbon-fields)
- Classic Editor 1.5 (also verified with Disable Gutenberg 2.0 – basically, whenever Gutenberg is disabled)
If I disable any one of the 3 plugins above (doesn’t matter which), I do not get the error. It only occurs when I have all 3 activated. I realize that you cannot control other developers plugins, but I am left with a sad dilemma:
- I can’t disable Classic Editor because the clients want to be able to enable/disable Gutenberg selectively.
- I can’t disable Carbon Fields because I’ve used it extensively to build their sites. I don’t necessarily have a problem using something else for a custom fields framework, but the sites are already written to use it extensively.
That leaves me with only two options:
- Use version 1.0.28.1, or
- Discontinue using Rank Math ??
I thought that I would ask here in case you could come up with a third option, because I’d really like to use Rank Math on all of the sites. It seems that lodash doesn’t like it when Gutenberg is disabled in WordPress.
If it helps, console logs of the error –
Chrome: https://pastebin.com/DDGwtAQ9
Firefox: https://pastebin.com/WveuGrCvI can also post an archive of the test site somewhere, but it’s just new WP 5.3.2 install with all defaults except the above noted plugins activated.
Thank you,
DanielEDIT: I wonder if something like this is in order? https://github.com/WP-API/node-wpapi/issues/193
The difficulty is tracking down where in which plugins it would be needed. :/
- The topic ‘1.0.3x WP 5.x: lodash conflict? _.pluck is not a function’ is closed to new replies.