Bug with block content field causing undo changes and URI Malformed error.

22 replies
Last updated: Jul 29, 2022
Sorry, another bug. Often, when we're typing in the block content field, it fights us. It'll undo changes we've made as we're typing them and it'll tell us 'URI Malformed' when we're nowhere near a link (and only on specific words in specific positions). I don't know how to reproduce it, but we'll constantly realize it erased our work somehow.
Jun 3, 2022, 10:48 PM
Any chance you have multiple people logged into the same account?
Jun 3, 2022, 10:50 PM
sometimes we do. Is that the issue?
Jun 3, 2022, 10:51 PM
I'm not 100% sure, but it seemed to be a problem for me once too
Jun 3, 2022, 10:52 PM
hmmm ok
Jun 3, 2022, 11:07 PM
i hope that's not, a big selling point is that we can edit together
Jun 3, 2022, 11:07 PM
You can make free admin accounts for each user
Jun 3, 2022, 11:10 PM
It was when they were using the same exact account at the same time that I had issues
Jun 3, 2022, 11:10 PM
Indeed, sharing an account would explain this behaviour. User's advice is sound so I'll mark this as resolved, but please feel free to follow up if you experience this on distinct accounts.
Jun 3, 2022, 11:25 PM
oh! I misunderstood. We have multiple people logged into sanity for the same project, but not under the same account. But we still have these issues.
Jun 6, 2022, 2:49 PM
Okay, thank you for that update. We will pick this back up then.
Jun 6, 2022, 2:51 PM
User: Is this error reproducible?
Jun 6, 2022, 3:17 PM
not consistently. it usually happens after one person makes many edits, likely because someone else also opens sanity
Jun 6, 2022, 3:26 PM
im guessing that there's some realtime synchronizing issue, where if I'm editing a draft and someone else starts editing the draft, we're working off different versions of the draft and they start overrriding each other even though we're focused on different parts of the document
Jun 6, 2022, 3:27 PM
im assuming the draft you're synchronizing is the full document rather than the partial edit being made, which likely has some weird merging of drafts issues that must be tossing edits. im just guessing, but that's how it feels.
Jun 6, 2022, 3:50 PM
The Studio will use revision ids and DiffMatchPatch to only change specific parts of block content (and as an aside, only specific fields in a document). I wasn’t able to replicate the URI Malformed error yet.
Do you have any more details about “only on specific words in specific positions”?
Jun 6, 2022, 4:11 PM
There was a point in time where we had a sentence that had the "wo" in it and we were trying to correct it to "won". We could edit the rest of the block content but, no matter what we did with that word, it would undo and the URI Malformed error kept happening. Even when I deleted the word and retyped it. I only got around it by typing the word "won" a few words away, deleted most of the sentence to get it in the right spot, and then retyping the other words.
Jun 6, 2022, 4:26 PM
For whatever reason, that "wo" was very upset when I edited it, but retyping "won" nearby was ok.
Jun 6, 2022, 4:27 PM
I do know that initially the content was a copy/paste from a google doc, so maybe some underlying meta was associated with the "wo"? When I inspected the doc, nothing seemed special about it, it was just casually in the middle of some span.
Jun 6, 2022, 4:28 PM
Sorry I can't be more helpful with reproduction steps! Not really sure how I even got in that broken state.
Jun 6, 2022, 4:28 PM
That’s very helpful. Thank you. It definitely sounds like there was something coming from the Google Doc that the portable text editor didn’t like. If you happen to come across the original document again and are able to reproduce, please let us know. In the meantime, it does seem like there was a problematic mark affiliated with “wo”.
Jun 6, 2022, 4:34 PM
ok, we do also have issues with people's work just vanishing often, but that's a separate and hard to reproduce issue.
Jun 6, 2022, 5:53 PM
I would like to add to this thread that emojis cause the URI malformed error to be thrown.
Jul 29, 2022, 10:27 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?