Jetpack: AtD: ensure that it gets triggered and can check text in Gutenberg blocks

Created on 22 Mar 2018  Â·  7Comments  Â·  Source: Automattic/jetpack

Steps to reproduce the issue

Source issue is in the Gutenberg repo.

What I expected

AtD should not throw errors when utilizing Gutenberg.

What happened instead

Error edit.getParam().join is not a function on opening a post with Gutenberg.

AtD Gutenberg [Pri] Normal [Type] Bug

All 7 comments

This issue has been marked as stale. This happened because:

  • It has been inactive in the past 6 months.
  • It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

@nosolosw are you still seeing this issue with AtD when using Gutenberg?

I enabled the "Check your spelling, style, and grammar" section (and all the items within) and I don't see any error now. Let me know if I should anything else.

Thanks for giving it another try. I'll leave this issue open for now, but rephrase the title, as we still have some work to do to make sure AtD is fully compatible with Gutenberg.

Ha! I've accidentally found how to reproduce it: it the post/page has a classic block I get the edit.getParam() is not a function error.

Adding that I also experienced this when using Gutenberg to open an old post that gets converted to a classic block:

atdCore.setIgnoreStrings( editor.getParam( 'atd_ignore_strings', [] ).join(',') );

From https://github.com/Automattic/jetpack/blob/f8078c2cd12ac508334da2fb08e37a92cf283c14/modules/after-the-deadline/tinymce/editor_plugin.js#L94

The problem seems to be that the editor.getParam( 'atd_ignore_strings', [] ) is returning the string [""] (i.e an array encoded as a string). The .join is then incorrectly applied.

If I add something to the Jetpack 'ignored phrases' setting then the string is ["test"]

Disabling AtD stops the problem.

@mdawaffe - can you take a look at this one? Looks like you worked on it previously :)

Was this page helpful?
0 / 5 - 0 ratings