Plugin conflicts with RankMath
-
Just to let you know, there must be a conflict with the RankMath plugin.
Certain releases make the RankMath box in Edit mode unusable.
4.0.0 caused the problem. 4.0.1 was ok. Now 4.0.2 causes the problem again.There is also a report at RankMath here
https://support.rankmath.com/ticket/rankmath-free-conflicts-with-font-awesome-plugin/Best regards,
George
-
OK, thanks for the report. I’d like to be able to reproduce this to investigate, but I’m not familiar with RankMath. I see from that forum post that:
the RankMath box in edit mode shows “null” and does not allow entering Focus Keywords and such
…but could you help me to understand what it means for “the RankMath box [be] in edit mode”? A description of the steps to reproduce that situation, or a screenshot?
Hi @mlwilkerson ,
thanks for following up on this.
With Font Aweseom 4.0.1 is was ok. The RankMath box is underneath the edit field when working on a post. It allows to enter SEO related information. See this screenshot:
https://support.lewe.com/images/rankmath-ok.jpgAfter the update to Font Awesome 4.0.2 the RankMath box looks like this:
https://support.lewe.com/images/rankmath-not-ok.jpgI don’t know what changed between 4.0.1 and 4.0.2 of your plugin but that might be a starting point to find where the conflict may be.
Thanks for your help,
GeorgeI also ran into this conflict this morning after putting in a support request at RankMath and discovered FontAwesome 4.0.2 was the issue. As George reported 4.0.1 is fine.
Same problem here (https://support.rankmath.com/ticket/font-awesome-conflict-with-rank-math/?view=all).
Thanks.Yes, I also got the same problem in Rank Math after updating Font Awesome plugin to version 4.0.2.
Thanks
Thanks for the additional detail and screenshots. I’ve reproduced the error. Investigating…
I’ve found a way to fix this, and I intend to post a pre-release here soon for others to confirm the fix before releasing it as 4.0.3.
But it’s possible that the root cause is actually a mistaken assumption in the RankMath code base. I haven’t confirmed that in their codebase, but I’ve reproduced the problem even without activating this plugin (see below, if you like).
—
What follows is some more technical description that may only be helpful to RankMath–or might be entertaining to the curious ??
From my vantage point, the fix I plan to make is a change that happens to work fine for this plugin’s purposes, and also avoids the problem scenario with RankMath. But the same error could conceivably surface again with RankMath in combination with some other theme or plugin in the future.
When this plugin detects that it’s running a recent-enough version of WordPress 5 (so that it has compatible JavaScript libraries–WP 5.4 or later), and the icon chooser is enabled, it declares dependence on the WP Core JavaScript libraries
wp-editor
andwp-blocks
. The icon chooser is enabled when there’s an editor on apost.php
orpost-new.php
page.One of the editor integration bugs discovered in this plugin’s v4.0.0 is that on pages where plugins or themes add Classic Editor instance to pages that are “Gutenberg Pages” (i.e. pages where all the stuff required to run the Block Editor is also loaded), it wasn’t all playing nicely together. So in 4.0.1 we made a (probably temporary) change to prioritize for the Block Editor. So if
is_gutenberg_page()
istrue
, then we set up the icon chooser integration for the Block Editor, but not for the Classic Editor.If it’s a Block Editor (Gutenberg) page, this plugin (currently) does not enable the icon chooser integration for the Classic Editor. So the current limitation is: you can’t have both integrations on the same page–priority goes to Gutenberg.
In this plugin’s v4.0.2, when the icon chooser is enabled on a recent-enough WP5, then the
wp-blocks
andwp-editor
dependencies are declared, even though–because of the above (probably temporary) limitation, the plugin doesn’t end up using them on a non-Gutenberg page. In other words, when you’re not using the Block Editor–only the Classic Editor–those dependencies end up being loaded even though they aren’t necessary in that case. It’s because they aren’t necessary in our case that I can remove them, which satisfies RankMath when running on a Classic Editor-only page. But it seems that it’s the mere loading of those dependencies–nothing more–that breaks RankMath in the Classic Editor.Any other theme or plugin out there that happens to declare these dependencies would produce the same conditions that result in this error in RankMath. I confirmed this by completely disabling the Font Awesome plugin, and adding a script that does nothing except printing a console message, and that also depends on
wp-editor
(that’s the smoking gun, notwp-blocks
). Just that minimal test case was enough to produce the same error in the RankMath editor, when using the Classic Editor.Ok, for those who are able to give this a try, could you?
You can download a zip of
4.0.3-rc1
from our GitHub repo here.You could install this using Add New Plugin, and Upload this zip file. If you already have a previous version of the plugin install, it’ll do an upgrade.
Hi @mlwilkerson ,
thanks for the quick fix. I tested 4.0.3-rc1 and it seems to work fine.
Best regards,
George4.0.3-rc1 has also solved the problems my sites were experiencing with 4.0.2, where data in the RankMath block would disappear from WooCommerce product details.
Thank you for the quick-acting @mlwilkerson – worked for me as well
Thank you so much, @mlwilkerson! I was just coming to post about this issue when I saw this thread and your fix. It works!
Worked on RankMath, thanks team ??
I confirm this has fixed the issue. I will update my RankMath support ticket with this thread and urge them to change their codebase to avoid future conflicts.
Update: I’m now thinking that there’s probably not a problem with RankMath, and that this is 100% My Bad.
When the
wp-editor
script dependency is loaded, it makes an assignment to the globalwp.editor
object. When in the Classic Editor mode, making that assignment overwrites thewp.editor
that had been there with one that corresponds to the Block Editor. So any component on that page that relies thatwp.editor
global would understandably be confused.Presumably, that’s what’s happening for RankMath. Previously, I’d thought that our plugin’s dependence on
wp-editor
while in the Classic Editor was unnecessary but harmless; now I see that it has this global side effect that could very well cause problems for others.I’m in the process of releasing 4.0.3 now.
- The topic ‘Plugin conflicts with RankMath’ is closed to new replies.