Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PTE] Cannot get the start point in the node at path [13] because it has no start text node. #4181

Open
ritesh-kanchi opened this issue Feb 17, 2023 · 4 comments
Labels

Comments

@ritesh-kanchi
Copy link

Describe the bug
While editing Portable Text field in Sanity, after a certain amount of writing, the Desk Tool crashes, displaying the following error:

Error: Cannot get the start point in the node at path [13] because it has no start text node.
Error: Cannot get the start point in the node at path [13] because it has no start text node.
    at Object.point (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:1458:1149)
    at Object.start (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:1458:3600)
    at Object.range (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:1458:3152)
    at $$ (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:1460:5104)
    at m5t (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:1461:1112)
    at h7 (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:87:19575)
    at _0e (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:89:44188)
    at w0e (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:89:39891)
    at U$e (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:89:39814)
    at $x (https://STUDIOLINK/static/desk-2d9c1d72-f6119bba.js:89:39664)

To Reproduce
Not sure, happened after updating Sanity to 3.4.0.

Expected behavior

The desk tool shouldn't crash in the process of editing a Portable Text/Block Content Field

Which versions of Sanity are you using?
@sanity/cli (global) 3.4.0 (up to date)
@sanity/eslint-config-studio 2.0.1 (up to date)
@sanity/vision 3.4.0 (up to date)
sanity 3.4.0 (up to date)

What operating system are you using?
MacOS

Which versions of Node.js / npm are you running?
npm 9.1.1
Node.js v18.12.1

@rexxars rexxars changed the title Cannot get the start point in the node at path [13] because it has no start text node. [PTE] Cannot get the start point in the node at path [13] because it has no start text node. Feb 18, 2023
@rexxars rexxars added the bug label Feb 18, 2023
@ritesh-kanchi
Copy link
Author

Just working with Portable Text - in general it feels a lot more buggy in Sanity v3 than it ever did on v2 - not sure of what majorly changed behind the scenes? But I'll get errors like this, along with general publishing errors. I'll write a chunk of text, hit Publish, and then half of it disappears, along with the Version History for it.

Another example that recreates this problem as specified above is writing, switching to bold while writing, and switching back out. It creates either a weird duplication of text effect or mass-deletion, before throwing this Desk Tool error.

@kmelve
Copy link
Member

kmelve commented Feb 23, 2023

Thanks for reporting @ritesh-kanchi! We're looking into this, stay tuned!

@skogsmaskin
Copy link
Member

skogsmaskin commented Mar 1, 2023

We are working on this. Unfortunately v.3.4.0 introduced some regressions 😓

Another example that recreates this problem as specified above is writing, switching to bold while writing, and switching back out. It creates either a weird duplication of text effect or mass-deletion, before throwing this Desk Tool error.

@ritesh-kanchi - this issue should be fixed now with the release of 3.5.1.

@SG60
Copy link

SG60 commented Mar 10, 2023

v3.6 seems to have resolved this for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants