Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.78k stars 894 forks source link

Conflict with YITH Affiliates #14857

Closed yzmp closed 4 years ago

yzmp commented 4 years ago

Please give us a description of what happened.

I was having a problem with Yoast SEO metabox not showing correctly its contents on edit post page (https://imgur.com/7a5ukIn) and checked for plugins conflicts as explained by Yoast here: https://yoast.com/help/how-to-check-for-plugin-conflicts/

So, I installed Health Check, entered Troubleshooting mode and activated only Yoast. The problem wasn’t reproduced. I did that to every plugin I have and the only combination that reproduced the error was the one that had Yoast, WooCommerce and YITH Affiliates plugins activated.

With this combination of plugins, I’ve found this error on Chrome console (it seems this is causing the error of Yoast metabox not showing its contents):

Uncaught ReferenceError: yith_wcaf is not defined
    at Function.a.yith_wcaf_set_cookies (yith-wcaf.min.js?ver=5.4:13)
    at HTMLDocument.<anonymous> (yith-wcaf.min.js?ver=5.4:14)
    at i (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:2)
    at Function.ready (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:2)
    at HTMLDocument.J (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:2)

wp-auth-check.min.js?ver=5.4:2 Uncaught TypeError: Cannot read property 'hasClass' of undefined
    at HTMLDocument.<anonymous> (wp-auth-check.min.js?ver=5.4:2)
    at HTMLDocument.dispatch (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:3)
    at HTMLDocument.r.handle (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:3)
    at Object.trigger (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:3)
    at Object.a.event.trigger (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:8)
    at HTMLDocument.<anonymous> (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:3)
    at Function.each (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:2)
    at a.fn.init.each (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:2)
    at a.fn.init.trigger (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.4:3)
    at Object.<anonymous> (load-scripts.php?c=1&load[chunk_0]=hoverIntent,common,hoverintent-js,admin-bar,heartbeat,wp-url&ver=5.4:11)

The last time YITH Affiliates was updated was in the beginning of march, but I have posts from other authors after that date with keyword and meta-description defined, what makes me think it’s one of Yoast’s last updates that triggered this issue.

Also, this problem happens on edit posts page, but not on edit products.

Please describe what you expected to happen and why.

How can we reproduce this behavior?

  1. Activate Yoast SEO, WooCommerce and YITH Affiliates
  2. Go to edit post page
  3. Try to use Yoast metabox

Technical info

Used versions

Djennez commented 4 years ago

@yzmp have you contacted Yith with this error? From what I can see in your logs there's an error with Yith. This error may cause our metabox to not show correctly (search our issues for "empty metabox" issues).

We can't test this because YITH Affiliates seems to be a paid plugin. This probably means you can request their support in this matter and see what info they can give you.

yzmp commented 4 years ago

@Djennez yes, I did! Just before posting here :) https://wordpress.org/support/topic/conflict-with-yoast-seo-39/

I posted here because Yoast's site recommends warning both plugins.

They also have a free version of the plugin which is the one I'm using now. But no worries, they updated their plugin today and Yoast seems to be working again as expected.

Thanks!