Documents (articles) don't load after successful import

Hi, I am having a dilemma here - we did an import of a bunch of articles from Wordpress, everything went fine, we published the release, and I see all the articles in the back end, listed under articles document type. I see them on the front end, too. However, I can't open any of them in Prismic, when I want to edit a single article. It either keeps loading and loading and loading forever, or gives me white screen.

Hi Anna,

I'll be happy to dig into this for you. Can you share with me the URL of your repository?

Thanks.

Hi Phil, thank you for your message, here is the URL https://littlebigchange.prismic.io/

I'm investigating this and will get back once I know more.

I was able to reproduce the error and have passed this to the dev team to investigate. I'll let you know once I have more information about what is happening.

Hi Phil, just checking if there is any news with regards to this issue. From what we can tell, the issue is related to parsing the "span" element in the body of the article on the Prismic side. We tried a test article import with spans and without and the former one fails to open giving a console js RangeError.
Thank you.

Hi Anna,

The team have been looking into it but hasn't been able to pinpoint the issue. Can you go into more detail about precisely what you mean about the span element? Can you give me some example code of where that exists?

Thanks.

Sure,

we noticed that article documents imported with spans in their body data elements are the ones that do not open (although it worked before for us, since we did numerous test imports prior to the large one and never had an issue opening an imported article before on Prismic).

the span elements I am talking about are the following ones (see the below example of an element in a document body content)

{
      "key": "title$f8d93391-8e5e-4372-8fc1-e8bd95d6ca8f",
      "value": {
        "repeat": [
          {}
        ],
        "non-repeat": {
          "content": [
            {
              "type": "heading3",
              "content": {
                "text": "Le saviez-vous ? Pourquoi bébé ne fait pas ses nuits ?",
                "spans": [
                  {
                    "start": 0,
                    "end": 54,
                    "type": "label"
                  }
                ]
              }
            }
          ]
        }
      }
    },

this part makes Prismic break while opening an imported document for editing:

"spans": [
                  {
                    "start": 0,
                    "end": 54,
                    "type": "label"
                  }
                ]

when i remove them all from a document in question, after the re-import of the article, I can open it for editing. When I re-import it as is, with the spans intact (not empty), I can't open the imported document anymore for editing and the following js console error ensues while the document loads indefinitely: (pls see the screenshot below)

Please let me know if you need any more info from me.
thank you.

Thank you for giving such detailed info this really helps, I've passed this to the devs and I'll let you know once I have more information on what's happening.

Thanks.

Hi Phil, just checking if there is any news with regards to this issue? We have our blog migration stalled because of this, and if we could get any sort of ETA, it would be great for our planning. thank you!

I have nothing just yet, I'm following up with the team, and I'll definitely get you an ETA today.

Hi Anna,

I'm still following up with the team, they've raised the level of priority on this issue. If possible, can you send me a copy of your import for the team to test?

I've sent you a private message if you'd prefer to send it there.

Thanks.

Hi Anna,

I believe Andrea from our team has been in contact with someone in your organisation about this already, but here's what the team has got back to me:

Hello, sorry for the delay. From what I understood, the repository is in a good state since they performed an import again to repair documents.
I can confirm on my side that they can open their documents.
Now, we can assist them in finding what causes the issues with their import files.
We plan to look at it ASAP.

Thanks.

@anna.lambrix ,

The team finally found the root cause of this issue. The data property is missing.

Something like:

{
      "key": "title$f8d93391-8e5e-4372-8fc1-e8bd95d6ca8f",
      "value": {
        "repeat": [
          {}
        ],
        "non-repeat": {
          "content": [
            {
              "type": "heading3",
              "content": {
                "text": "Le saviez-vous ? Pourquoi bébé ne fait pas ses nuits ?",
                "spans": [
                  {
                    "start": 0,
                    "end": 54,
                    "type": "label"
                  }
                ]
              }
            }
          ]
        }
      }
    },

Should be:

{
      "key": "title$f8d93391-8e5e-4372-8fc1-e8bd95d6ca8f",
      "value": {
        "repeat": [
          {}
        ],
        "non-repeat": {
          "content": [
            {
              "type": "heading3",
              "content": {
                "text": "Le saviez-vous ? Pourquoi bébé ne fait pas ses nuits ?",
                "spans": [
                  {
                    "start": 0,
                    "end": 54,
                    "type": "label"
                    "data": "label-value"
                  }
                ]
              }
            }
          ]
        }
      }
    },