Wp-calypso: Gutenberg: Editor crashes after copying a page [2]

Created on 19 May 2019  ·  6Comments  ·  Source: Automattic/wp-calypso

This problem occurs only on a single site. I was unable to replicate it on any other sites that I tested. Basically, on this site, if you copy a page and then open the page attributes module on the right, the Editor crashes instantly.

Steps to reproduce

  1. SSP into boxepipla (SU doesn't reproduce the issue)
  2. Go to My Sites -> Site -> Pages
  3. Use the three-dots next to any page and click Copy. Wait for the editor to load with the copied content.
  4. Click the Page Attributes module on the right. If it is open by default, wait a few seconds.

What I expected

The editor to keep its content there allowing me to modify changes as I wanted.

What happened instead

The following error shows up, which the user says in English translates to "The editor experienced an unexpected error."

Browser / OS version

I tested this on Chrome/74.0.3729.157 with macOS Mojave. But the user said they checked multiple browsers/computers on different connections and they were seeing this error everywhere.

Screenshot / Video

wp

Context / Source

Originally reported on 12843484-hc, follow-up on 2037234-zd.

Editor [Goal] Gutenberg user-waiting

Most helpful comment

We think we have narrowed replication of this issue down to sites that have 100+ pages, and in these instances can be replicated without needing to copy a page.

Steps to replicate:

  1. Log into a site with more than 100 pages and with block editor enabled
  2. Choose a page to edit
  3. Once page is loaded in the block editor expand Page Attributes in the right hand document attributes bar
  4. Wait for several seconds and the editor will crash

Cause of the issue:

Where a site has more than 100 pages, the call to the /pages api endpoint is paged A next header link is generated to provide the link to get the next set of pages, and the client automatically loops and retrieves all of the pages in a result set. The api was not including the api path in this header link and so the client failed when trying to retrieve the subsequent pages.

We have D29347-code in progress to hopefully resolve this issue.

All 6 comments

User has been back into chat asking for an update.
As this seemed like a site related issue, we decided to export content from boxepipla.com to a new test site boxcorfu.wordpress.com - Errors also present in the new site, which leads us to think this is a content-related issue.
As the site and interface were in Greek, I asked the user to change these to English and continued to test. Same errors.
User has uploaded a video of the problem here: https://drive.google.com/file/d/1cOZ3JUp9HQ0DS8fhQtM2hBxBGjbmbQcl/view

I was able to SSP and replicate error: https://cld.wthms.co/jnT7Ci

Ticket: #2064790-zen

The error provided when I SSP-ed and got the issue:

TypeError: Cannot read property 'raw' of undefined at https://s2.wp.com/_static/??-eJx9z00KAjEMBeAL2SllHJiNeJa2CZLaP5oUndur4FKzDO/j8WIf3VCNeQKyTWyBWCx4waVQXRKf7C9Qm1BE1s18qjkCSRsqCbnFu8kUhh+HKqEVM9DDX/U+sQQEtaXneaOqv/WZbXpj+aprubht2507r+ueXtATeYU=:40:64261 at Array.map (<anonymous>) at https://s2.wp.com/_static/??-eJx9z00KAjEMBeAL2SllHJiNeJa2CZLaP5oUndur4FKzDO/j8WIf3VCNeQKyTWyBWCx4waVQXRKf7C9Qm1BE1s18qjkCSRsqCbnFu8kUhh+HKqEVM9DDX/U+sQQEtaXneaOqv/WZbXpj+aprubht2507r+ueXtATeYU=:40:64201 at Td (https://s1.wp.com/_static/??-eJyNzEsOwjAMRdEN4ZoCVUeItbiJEQ75KXaKxOrpgCGqGL/zLr4qSHaxe1YMil7UcIllGZLkIegBfwHqVuqu2BLuCcpNKMqbTEoGz3fq0aBS24bd+8rZl4aNydnfEHxJu5jVUWV4WIpfd0vXcZrm02Wcz8fwAaHbYhM=:119:11) at be (https://s1.wp.com/_static/??-eJyNzEsOwjAMRdEN4ZoCVUeItbiJEQ75KXaKxOrpgCGqGL/zLr4qSHaxe1YMil7UcIllGZLkIegBfwHqVuqu2BLuCcpNKMqbTEoGz3fq0aBS24bd+8rZl4aNydnfEHxJu5jVUWV4WIpfd0vXcZrm02Wcz8fwAaHbYhM=:128:479) at hi (https://s1.wp.com/_static/??-eJyNzEsOwjAMRdEN4ZoCVUeItbiJEQ75KXaKxOrpgCGqGL/zLr4qSHaxe1YMil7UcIllGZLkIegBfwHqVuqu2BLuCcpNKMqbTEoGz3fq0aBS24bd+8rZl4aNydnfEHxJu5jVUWV4WIpfd0vXcZrm02Wcz8fwAaHbYhM=:141:202) at Qg (https://s1.wp.com/_static/??-eJyNzEsOwjAMRdEN4ZoCVUeItbiJEQ75KXaKxOrpgCGqGL/zLr4qSHaxe1YMil7UcIllGZLkIegBfwHqVuqu2BLuCcpNKMqbTEoGz3fq0aBS24bd+8rZl4aNydnfEHxJu5jVUWV4WIpfd0vXcZrm02Wcz8fwAaHbYhM=:181:217) at Rg (https://s1.wp.com/_static/??-eJyNzEsOwjAMRdEN4ZoCVUeItbiJEQ75KXaKxOrpgCGqGL/zLr4qSHaxe1YMil7UcIllGZLkIegBfwHqVuqu2BLuCcpNKMqbTEoGz3fq0aBS24bd+8rZl4aNydnfEHxJu5jVUWV4WIpfd0vXcZrm02Wcz8fwAaHbYhM=:182:76) at Sc (https://s1.wp.com/_static/??-eJyNzEsOwjAMRdEN4ZoCVUeItbiJEQ75KXaKxOrpgCGqGL/zLr4qSHaxe1YMil7UcIllGZLkIegBfwHqVuqu2BLuCcpNKMqbTEoGz3fq0aBS24bd+8rZl4aNydnfEHxJu5jVUWV4WIpfd0vXcZrm02Wcz8fwAaHbYhM=:195:109) at Z (https://s1.wp.com/_static/??-eJyNzEsOwjAMRdEN4ZoCVUeItbiJEQ75KXaKxOrpgCGqGL/zLr4qSHaxe1YMil7UcIllGZLkIegBfwHqVuqu2BLuCcpNKMqbTEoGz3fq0aBS24bd+8rZl4aNydnfEHxJu5jVUWV4WIpfd0vXcZrm02Wcz8fwAaHbYhM=:193:492)

The user came back to chat again asking about updates, they are losing their patience and considering canceling their subscription.
Are there any updates about the issue?

We think we have narrowed replication of this issue down to sites that have 100+ pages, and in these instances can be replicated without needing to copy a page.

Steps to replicate:

  1. Log into a site with more than 100 pages and with block editor enabled
  2. Choose a page to edit
  3. Once page is loaded in the block editor expand Page Attributes in the right hand document attributes bar
  4. Wait for several seconds and the editor will crash

Cause of the issue:

Where a site has more than 100 pages, the call to the /pages api endpoint is paged A next header link is generated to provide the link to get the next set of pages, and the client automatically loops and retrieves all of the pages in a result set. The api was not including the api path in this header link and so the client failed when trying to retrieve the subsequent pages.

We have D29347-code in progress to hopefully resolve this issue.

Closing this issue since D29347-code has been deployed and we cannot reproduce it anymore.

Contacted the user here on this follow-up: 2109569-zen

Was this page helpful?
0 / 5 - 0 ratings