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

Rely on post-edit and term-edit instead of post-scraper and term-scraper #247

Closed omarreiss closed 4 years ago

omarreiss commented 4 years ago

Summary

This PR can be summarized in the following changelog entry:

Test instructions

This PR can be tested by following these steps:

maartenleenders commented 4 years ago

Acceptance 🚧 Getting this error

yoast-acf-analysis.js?ver=2.3.0:422 Uncaught ReferenceError: YoastReplaceVarPlugin is not defined
    at Object.10../config/config.js (yoast-acf-analysis.js?ver=2.3.0:422)
    at o (yoast-acf-analysis.js?ver=2.3.0:1)
    at yoast-acf-analysis.js?ver=2.3.0:1
    at Object.1../collect/collect.js (yoast-acf-analysis.js?ver=2.3.0:6)
    at o (yoast-acf-analysis.js?ver=2.3.0:1)
    at yoast-acf-analysis.js?ver=2.3.0:1
    at Object.9../app.js (yoast-acf-analysis.js?ver=2.3.0:407)
    at o (yoast-acf-analysis.js?ver=2.3.0:1)
    at r (yoast-acf-analysis.js?ver=2.3.0:1)
    at yoast-acf-analysis.js?ver=2.3.0:1

...on post-edits and term-edits. YoastReplaceVarPlugin is expected to exist on line 5 of js/src/replacevars.js.

I tried pointing to YoastSEO.wp.replaceVarsPlugin directly (which is where we expose the plugin in post-scraper, but that object doesn't have the ReplaceVar object, that the YoastReplaceVarPlugin that was set on the window used to have.

maartenleenders commented 4 years ago

Acceptance 👍 ✅ :warning: Don’t merge until feature/social-metadata-previews-reactification is merged into trunk on wordpress-seo. :warning: