You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
If you enter too much text into a Rich Text field then when you click off the block you will see a grey block instead of the content with the error message:
That is a pretty generic Gutenberg error which a quick google search shows los of people have for what appears to be a wide variety of reasons. I suspect a good chunk of those are for the same reason I am detailing here. I don't believe there is anything you can do about this beside forcing a max character limit internally but I am unsure of what the limit should be. I explain why that is below.
I added this as a bug ticket mainly to get it into the system in case anybody else ran into the problem so they could see a possible solution e.g. reduce the amount of text in the field or split it into multiple fields/blocks.
Steps to reproduce
Create new Block with a Rich Text field
Place that Block on a new page
Copy and paste a lot of text into it
An example of it breaking is to enter 8050 characters. I used this site to generate a single string of that length: http://www.unit-conversion.info/texttools/random-string-generator/ and I see the error. If I delete 1 character so the length is 8049 then the Block preview works.
This was actually identified on a client site where they had dumped a ton of text into the Rich Text field that they copy and pasted from their old site. Strangely with that the number of characters that broke the preview was 5899. If I chopped it down to 5898 then it works.
Edit: Also had it with another Block with 4026 characters in it. Tried chopping 20 characters off and it was still showing the error. Didn't have time to investigate that one further as I have 50+ other pages to check and "fix".
It would be great if someone could explain the difference so I could pass that along to the client.
In my testing this only affects the Block preview box. The full text is saved and loaded. If you click the Block to edit it then you do see the full text and there are no errors when saving, besides the grey preview box error. All the text is displayed successfully on the front end.
The text was updated successfully, but these errors were encountered:
Just found another area with the problem. This time it's the client mis-using a repeater block. We didn't set an upper limit on it so they have added 25 items. The repeated items are not complex, essentially it's 2 titles and 2 Rich Text boxes for a 2 column layout. Each only has one or two fairly short paragraphs. The problem is the same as in my first post, grey block saying there was an "Error loading block". Editing works and the data is displayed on the front end.
My two guesses are either (a) too much data is being returned for the Preview to display or (b) there is some sort of vertical limit to what can be visually displayed in a block preview. I'm leaning towards the later since the character limit seemed variable based on tests I mentioned in my first post.
Bug summary
If you enter too much text into a Rich Text field then when you click off the block you will see a grey block instead of the content with the error message:
Error loading block: The response is not a valid JSON response.
https://imgur.com/KY7YTpn
That is a pretty generic Gutenberg error which a quick google search shows los of people have for what appears to be a wide variety of reasons. I suspect a good chunk of those are for the same reason I am detailing here. I don't believe there is anything you can do about this beside forcing a max character limit internally but I am unsure of what the limit should be. I explain why that is below.
I added this as a bug ticket mainly to get it into the system in case anybody else ran into the problem so they could see a possible solution e.g. reduce the amount of text in the field or split it into multiple fields/blocks.
Steps to reproduce
An example of it breaking is to enter 8050 characters. I used this site to generate a single string of that length: http://www.unit-conversion.info/texttools/random-string-generator/ and I see the error. If I delete 1 character so the length is 8049 then the Block preview works.
This was actually identified on a client site where they had dumped a ton of text into the Rich Text field that they copy and pasted from their old site. Strangely with that the number of characters that broke the preview was 5899. If I chopped it down to 5898 then it works.
Edit: Also had it with another Block with 4026 characters in it. Tried chopping 20 characters off and it was still showing the error. Didn't have time to investigate that one further as I have 50+ other pages to check and "fix".
It would be great if someone could explain the difference so I could pass that along to the client.
In my testing this only affects the Block preview box. The full text is saved and loaded. If you click the Block to edit it then you do see the full text and there are no errors when saving, besides the grey preview box error. All the text is displayed successfully on the front end.
The text was updated successfully, but these errors were encountered: