I’ve been a devoted, long-term fan of Grammarly – the online spelling and grammar checker. I’ve recommended it on this very site and used it when writing posts on here. Which is how I’ve come to notice that – when used in conjunction with WordPress’s new Gutenberg editor – it’s introducing errors in your blog posts, not correcting them.
What’s going wrong with Grammarly?
This bug first came to light on our website this morning. As normal, my co-editor was checking over a piece I’d edited myself, and he’d spotted an error.
“There’s a rogue paragraph in David’s power bank review that needs fixing,” he wrote in a message on Slack.
I jumped into the story on my laptop but couldn’t see a problem. I fetched another cup of coffee and read it again. No, nothing to scare the chickens there.
Are you sure, Tim? Do you mean the paragraph starting with “The packaging consists”, which was worded a little oddly, but certainly not what I’d describe as “rogue”.
“Ah, I can’t see that phrase,” he replies. “It just says ‘The p consists’ on the AMP version I’m looking at.”
At this point alarm bells started ringing. AMP is the stripped-down version of blog posts that are served to mobile devices. AMP strips out any extraneous HTML to ensure pages are served as quickly as possible. So I poked into the HTML version of the page in the WordPress CMS and spotted something odd in that paragraph.
<p>The p<g class="gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="9" data-gr-id="9">ackaging</g> consists of the Charge Anyway (with batteries inside), a USB cable and small instruction booklet.</p>
Those of you familiar with HTML will notice that Grammarly has injected some code around the word ‘packaging’, presumably when I used it to correct a typo.
I went back to some previous posts and the pattern was repeated: every time Grammarly ‘fixes’ something, it injects HTML into the copy that results in that correction simply disappearing altogether when the page is served to AMP viewers – which account for more than 60% of the viewers to our website. I’m told this also affects the output to RSS feeds.
Our WordPress wizard spotted that the problem appears to be confined to posts created in the new Gutenberg editor. We’re testing a pre-release version on the site at present, but Gutenberg is set to become the default WordPress editor very soon and WordPress is encouraging people to install it already from their website’s Dashboard.
Let’s hope Grammarly fixes this problem pretty damned quickly.
And if you’ve spotted missing letters/words in our articles over the past few weeks, I can only apologise. We’re off to fix them!
Now read this: How can I create a plugin for WordPress?