Yoast / yoast-acf-analysis

WordPress plugin that adds the content of all ACF fields to the Yoast SEO score analysis.
https://wordpress.org/plugins/acf-content-analysis-for-yoast-seo/
GNU General Public License v3.0
61 stars 20 forks source link

Breaks KingSumo Giveaway plugin #74

Closed spearsmarketing closed 7 years ago

spearsmarketing commented 7 years ago

When using the King Sumo Giveaway plugin (http://kingsumo.com/) in conjunction with Yoast ACF Analysis, the giveaway plugin will not work. It's not possible to edit the giveaway custom post type slug, and the screen options tab will not open either. Any idea what the issue might be?

kraftner commented 7 years ago

Can you check if you see any JavaScript Error when you open the Console (press F12)? Maybe something like wpseoPostScraperL10n is not defined?

I suspect this is an issue similar to #61

spearsmarketing commented 7 years ago

Here's what I get:

Uncaught Error: The snippet preview requires a valid target element
    at new F (wp-seo-post-scraper-540.min.js?ver=5.4:38)
    at Object.f [as create] (wp-seo-post-scraper-540.min.js?ver=5.4:1)
    at c (wp-seo-post-scraper-540.min.js?ver=5.4:1)
    at HTMLDocument.G (wp-seo-post-scraper-540.min.js?ver=5.4:1)
    at i (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:2)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:2)
    at Function.ready (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:2)
    at HTMLDocument.K (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:2)
wp-tinymce.php?c=1&ver=4603-20170530:25 Deprecated TinyMCE API call: <target>.onKeyUp.add(..)
load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,postbox,tags-suggest,tags-box,word-count,&load[]=post,svg-painter,wp-auth-check,shortcode,backbone,wp-backbone,media-models,wp-plupload,mediaelement,wp-mediaelement,media-views,&load[]=media-editor,media-audiovideo,mce-view,imgareaselect,image-edit,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-&load[]=color-picker,editor,quicktags,wplink,media-upload,wp-embed&ver=4.8.1:257 Uncaught TypeError: Cannot read property 'hasClass' of undefined
    at HTMLDocument.<anonymous> (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,postbox,tags-suggest,tags-box,word-count,&load[]=post,svg-painter,wp-auth-check,shortcode,backbone,wp-backbone,media-models,wp-plupload,mediaelement,wp-mediaelement,media-views,&load[]=media-editor,media-audiovideo,mce-view,imgareaselect,image-edit,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-&load[]=color-picker,editor,quicktags,wplink,media-upload,wp-embed&ver=4.8.1:257)
    at HTMLDocument.dispatch (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:3)
    at HTMLDocument.r.handle (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:3)
    at Object.trigger (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:3)
    at Object.a.event.trigger (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:9)
    at HTMLDocument.<anonymous> (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:3)
    at Function.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:2)
    at a.fn.init.each (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:2)
    at a.fn.init.trigger (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,suggest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,jquery-ui-position,j&load[]=query-ui-menu,wp-a11y,jquery-ui-autocomplete,underscore,wp-util,plupload,thickbox,jquery-ui-tooltip,jquery-ui-tabs,jquery-ui-res&load[]=izable&ver=4.8.1:3)
    at Object.<anonymous> (load-scripts.php?c=1&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,postbox,tags-suggest,tags-box,word-count,&load[]=post,svg-painter,wp-auth-check,shortcode,backbone,wp-backbone,media-models,wp-plupload,mediaelement,wp-mediaelement,media-views,&load[]=media-editor,media-audiovideo,mce-view,imgareaselect,image-edit,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-&load[]=color-picker,editor,quicktags,wplink,media-upload,wp-embed&ver=4.8.1:4)
spearsmarketing commented 7 years ago

screen shot 2017-09-12 at 1 13 42 pm

kraftner commented 7 years ago

Thanks for the additional details. Can you confirm this only happens when ACF Content Analysis for Yoast SEO is active and not with just Yoast SEO?

kraftner commented 7 years ago

Possibly related: https://github.com/Yoast/wordpress-seo/issues/4367 and maybe also https://github.com/Yoast/wordpress-seo/issues/7527

spearsmarketing commented 7 years ago

Yes, I have tested it and it is only happening when ACF Content Analysis is activated. Deactivating Yoast SEO does not not effect it.

spearsmarketing commented 7 years ago

I opened a support thread with KingSumo, and their developer test both plugins together and was able to reproduce the issue. He said that it appears to be something on the ACF Analysis side and thinks it could be some type of logic not taking custom post types into account.

kraftner commented 7 years ago

After some further thinking I believe this is due to our JS being loaded on a CPT without the Yoast SEO Metabox. So I guess this will be fixed once #67 lands.

spearsmarketing commented 7 years ago

Great to hear. Is there an estimate on when it will be updated?

kraftner commented 7 years ago

As you can see the PR is ready and just waiting for a review. As to how long that will take I can't promise anything but I think it won't take long anymore.

spearsmarketing commented 7 years ago

Great. Thanks!

kraftner commented 7 years ago

@spearsmarketing I've just merged the PR into the develop branch in case you're comfortable with trying it from there I'd appreciate feedback. Otherwise you'll probably have a little more patience until the changes are officially released.

spearsmarketing commented 7 years ago

Thanks @kraftner. I'm using it on a live site and have just deactivated ACF Analysis when running a giveaway, so I'm hesitate to test it out there. How long till it's merged into the update? I may have time later to test on a dummy site though and will let you know if I do.

kraftner commented 7 years ago

Okay please don't try it on a live site! (But you sound like you know that anyway. :wink: )

I don't dare promising when this is released - I'm working on this in my spare time so hard to tell. But we're getting there. :smile:

moorscode commented 7 years ago

We have improved the code in Yoast SEO (5.4+) to avoid throwing errors when the metabox is not being displayed.

As this plugin is a paid version, I would like to ask if you could update this issue with information about remaining problems regarding the JavaScript in combination with Yoast SEO 5.4.2 or higher, preferably the latest released version 5.6 or the RC of 5.7

moorscode commented 7 years ago

Removing the milestone while awaiting feedback.

kraftner commented 7 years ago

We've also just relased 2.0.1which should add further steps to prevent this from happening. Looking forward to your feedback @spearsmarketing

spearsmarketing commented 7 years ago

It seems to be working now. Thanks guys!

kraftner commented 7 years ago

:confetti_ball: