I created a block list for my home page. There I have three different element types that the editor can choose from.
I thought it would be nice if the editor could choose the background color for the sections they create. So I created an element type called bg settings and added a color picker with three colors. I added the bg settings as the settings element type as described in the documentation and went to the content section to try it out.
I could click on the settings icon and choose a color, but as soon as i klicked save the block I just added the settings to dissapears. Also any blocks of the same type disappear too. When I then remove the bg-settings back in the settings section in the block list data type the blocks reappear (sometimes they don't and are gone for good, I tried multiple times). I tried the same with a numeric editor instead of a color picker, just to make sure it's not a problem of the color picker for some reason and I get the same result.
Am I doing something wrong? By the way I'm using Versino 8.15.1, if that's relevant.
Not sure if this fix is too specific to my project, but wanted to post anyway in case it could help someone else narrow down the problem.
I was facing this issue yesterday, and found the issue was lying with one of my notification handlers that was running on the 'publishing' event.
The handler would try to deserialize the JSON property value from a blocklist property into a Umbraco.CMS.Core.Models.Blocks.BlockValue.cs object.
This had previously worked when using NewtonSoft Json.NET, but after switching to using System.Text.Json, the ContentData property of the BlockValue would be empty.
Switching back to NewtonSoft fixed the issue for now.
Avoid System.Text.Json it is very flakey and often hits major issues in my experience. I have tried using it in Net 6, Net 7, and Net 8.
For the others, bust your cache and see if it comes back.
Check in the SQL for the missing data, is it in the blocklist still or is the json for that now empty?
Block List Editor Content keeps disappearing
Hello there!
I created a block list for my home page. There I have three different element types that the editor can choose from.
I thought it would be nice if the editor could choose the background color for the sections they create. So I created an element type called bg settings and added a color picker with three colors. I added the bg settings as the settings element type as described in the documentation and went to the content section to try it out.
I could click on the settings icon and choose a color, but as soon as i klicked save the block I just added the settings to dissapears. Also any blocks of the same type disappear too. When I then remove the bg-settings back in the settings section in the block list data type the blocks reappear (sometimes they don't and are gone for good, I tried multiple times). I tried the same with a numeric editor instead of a color picker, just to make sure it's not a problem of the color picker for some reason and I get the same result.
Am I doing something wrong? By the way I'm using Versino 8.15.1, if that's relevant.
hi chantal,
did you ever solve this? we have the exact same problem in a project that started life in v9.
everything was working completely fine then all of a sudden the block list content stopped saving to the database.
the sequence is:
if you reload the node in the backoffice the block list content isn't there.
we've also recently updated the project to v10 and the problem is still there.
it's a real pain! there's no errors in the log or anything else that would indicate what the problem is...
+1 here - getting blocklist blank out on 8.14 every time we publish to the server.
I am not using settings on the block.
My sequence:
I'm also having this same issue in version 10.2.1. Blocklist is full of content 16-17 items, then we
When I check the version history / i can see the old contents of the list in the previous version, but when i rollback the list is still empty.
Anyone get anywhere with how to resolve this? Tempted to back to nested content until it stops happening at least the items stayed in place! :(
Not sure if this fix is too specific to my project, but wanted to post anyway in case it could help someone else narrow down the problem.
I was facing this issue yesterday, and found the issue was lying with one of my notification handlers that was running on the 'publishing' event.
The handler would try to deserialize the JSON property value from a blocklist property into a Umbraco.CMS.Core.Models.Blocks.BlockValue.cs object.
This had previously worked when using NewtonSoft Json.NET, but after switching to using System.Text.Json, the ContentData property of the BlockValue would be empty.
Switching back to NewtonSoft fixed the issue for now.
Avoid System.Text.Json it is very flakey and often hits major issues in my experience. I have tried using it in Net 6, Net 7, and Net 8.
For the others, bust your cache and see if it comes back. Check in the SQL for the missing data, is it in the blocklist still or is the json for that now empty?
is working on a reply...