Needs work
Project:
Real-time SEO for Drupal
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Aug 2018 at 06:15 UTC
Updated:
10 Oct 2025 at 22:08 UTC
Jump to comment: Most recent
Comments
Comment #2
chr.fritschAn update of the library would be really nice. 👍
Comment #3
kingdutchSupporting more than one version at a time in this module is quite difficult as the YoastSEO.js library itself no longer contains compiled files and instead pushes this responsibility to the implementing library (such as the Real-Time SEO module).
Because the YoastSEO.js module is licensed under GPL-3.0 it can not be hosted on Drupal.org, so instead we host a compiled mirror on https://github.com/GoalGorilla/RTSEO.js that we can pull in through composer.
In order to update the version of YoastSEO.js that this module uses we will have to compile the new version for the https://github.com/GoalGorilla/RTSEO.js repository.
I've spent a bit of time today trying to compile a newer version but we run into a few issues:
requireusage to ES6importstatements which requires a more complex build setup (the current babelify + browserify command no longer works).Newer versions of the YoastSEO.js library deprecate the App class that we duplicate to make it compatible with Drupal. To counteract that they also expose more core classes of the YoastSEO library. More work will be needed to figure out how the introduction of the webworker affects everything as well as what is needed to use the newly exposed classes to do the processing of texts.
Unfortunately this is not a straightforward update that can be performed quickly and the hardcoded version can not be removed because each minor update of the YoastSEO.js library could seriously break things.
Comment #4
kingdutchThe issue actually turned out to be with the contents of the npm repository which contained compiled code that Babel could not handle. Using the repository through yarn directly gave us proper ES6 code that Webpack and Babel were able to properly compile.
I think we can still improve on the current code with less duplication of the YoastSEO app by writing our own analysis pipeline and presenter. We can also improve filesizes by splitting out the YoastSEO library and removing our dependency on lodash.
The branch with the improvements can be tested from here: https://github.com/goalgorilla/RTSEO.js/tree/feature/improved-build-pipe... I've simply recompiled the App with the latest YoastSEO version and not done any testing yet. You can test this out by replacing the downloaded rtseo.js file through composer with the one in the dist folder on that branch.
More information about what was holding up this build with Webpack and Babel can be found here: https://github.com/Yoast/YoastSEO.js/issues/1687#issuecomment-431945915
Comment #5
Myddna commentedHow is the update going? Any chance the update will be ported to 7.x?
Thanks :)
Comment #6
shaneonabike commentedIt seems that the short term fix you proposed was ported into a merge. I tried to check out your latest YoastSEO.js but seems as though you nuked the tree.
Just wondering if you needed help testing anything (in D7)?
Comment #7
kingdutchHi :)
Unfortunately I don't see any of this being ported to Drupal 7. The rewrite to fix issues present in the 1.x version for Drupal 8 has already taken a year longer than I hoped (I wanted to publish 2.0 in June last year). This has been partially due to scope creep with some things that need to be done before a stable release because they would be backwards compatible breaks. This has also partially been due to a lack of time from my side.
I've merged the build pipeline improvements for the RTSEO.js library I referred to earlier into the main working branch: https://github.com/goalgorilla/RTSEO.js/tree/feature/react-presenter
Unfortunately, while I've been rebuilding, the Yoast team has also drastically changed the way their library works (and deprecated https://github.com/Yoast/YoastSEO.js/ moving to a monorepo setup) which will add on-top of the work of updating to their latest version.
Comment #8
shaneonabike commentedEgads that sucks! How could I go about helping you out with that? I don't mind building the backport for D7 when it's ready. I will also need to use the D8 version as well so I can help in testing.
As for the build process do you need help in figuring all that out?
Comment #9
fdefeyter@gmail.com commentedUP :) And thanks for this module ;)
Comment #10
kingdutchThe library has changed significantly so unfortunately this needs more work. Current work is ongoing on the following branch: https://github.com/goalgorilla/RTSEO.js/tree/feature/react-presenter
Comment #11
kingdutchComment #12
kingdutchComment #13
thejimbirch commentedA standalone version of the YoastSEO.js library has been released.
https://www.npmjs.com/package/yoastseo
https://github.com/Yoast/wordpress-seo/issues/17899
Comment #14
anybodyAs written in #3008802: The page freezes while the Real-Time SEO module runs script this should also include removing jQuery dependencies (using vanilla JS instead) and ensuring there's nothing blocking in JS like it was in the past.
Comment #15
alfattal commented@kingdutch I noticed that you're also the maintainer of the RTSEO.js library, which is a dependency for this module, where the "yoastseo" is listed as a dependency in the package.json file and still hard coded to version "1.29.0". This version is so old and has been flagged by Snyk code scanner for 101 issues 6 of them are critical. The recommendation is to upgrade to yoastseo@1.40.0. You can fix it there.