Amp-wp: Reusable blocks go unavailable

Created on 23 Aug 2019  路  10Comments  路  Source: ampproject/amp-wp

Summary

When AMP plugin version 1.2.1 is active, the Gutenberg editor does not show the option of Reusable Blocks when you click the + symbol to add a new block

Steps to reproduce

  1. Create a test WordPress site
  2. Create a post or a page, and save any test block as a Reusable block
    Screenshot 2019-08-23 at 3 09 04 PM
  3. Activate AMP plugin
  4. Open up another post and try to add the reusable block. You will not see the group
    2019-08-23 15 14 10 future-seahorse jurassic ninja ebb112ddb30a
  5. Deactivate AMP plugin and open a new page in editor, you see the reusable blocks again:
    2019-08-23 15 16 19 future-seahorse jurassic ninja f7419f8ea56d

Impact of the bug

Users who had Reusable blocks before updating their AMP plugin to 1.2.1, would all of a sudden see all these blocks go missing.

AMP Stories (obsolete) Bug Gutenberg P0

Most helpful comment

Let's do a hotfix release for this bug next week.

All 10 comments

Yikes, that sounds like a bug! Thanks for reporting this.

We might have been a bit overzealous in #2879. Since story templates are reusable blocks, we want them to be visible in the Stories editor, but not the regular block editor. Previously they were listed as reusable blocks though, even when one is not using AMP Stories.

Now it seems that no reusable blocks are shown in the block editor when AMP Stories is not active. This needs to be fixed.

@nagpai As a temporary workaround, I suggest turning on the Stories experience in the AMP plugin settings. You don't have to use it though and it won't have any impact on your website when it's turned on. But it will bring back your reusable blocks.

You can't use Stories unless you have the Gutenberg Plugin installed and active, which I do not have on my production site. So that's not really a great workaround for people.

Commenting out this change - https://github.com/ampproject/amp-wp/pull/2879/files#diff-00dc6914ea2368cc5f87b97dc2c4f636R38 - restored it for my site.

Let's do a hotfix release for this bug next week.

Testing instructions:

  • Add a Reusable block (add a block, click "More Options" block menu and choose "Add to Reusable Blocks")
  • Turn off AMP Stories Experience (uncheck AMP Stories from AMP General Settings)
  • Verify that the added Reusable block can be found in Block Inserter of a regular post (can be searched by its name, too).
  • Verify that the saved reusable block appears under /wp-admin/edit.php?post_type=wp_block
  • Verify that the Story Templates do not appear under the Reusable blocks (not in search nor in /wp-admin/edit.php?post_type=wp_block).

Turn on AMP Stories Experience and verify the same things.
Additionally, verify that the Templates to appear as expected in the Templates Inserter.

Verified in QA

(new ticket created to allow for reusable blocks in Stories)

@nagpai @Ipstenu Please test 1.2.2-RC1.

@westonruter I've tested this with 1.2.2-RC1 and it is working as expected now.

@westonruter I tested with latest stable WordPress test instance, and it works perfectly now. I am now able to see the reusable blocks settings correctly. Thanks to the team!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miina picture miina  路  5Comments

swissspidy picture swissspidy  路  4Comments

GitaStreet picture GitaStreet  路  4Comments

ernee picture ernee  路  4Comments

luizeof picture luizeof  路  4Comments