Block Grid - Data serialization issue in Umbraco backoffice upgrading from 15.1.1 to 15.2.2

Block Grid - Data serialization issue in Umbraco backoffice upgrading from 15.1.1 to 15.2.2

Environment

  • Umbraco version: 15.2.2

  • .NET version: 8.0

  • Database: SQLCE

  • OS: Windows 11

Issue Description

When attempting to save a page containing a Block Grid Editor in the Umbraco backoffice, I’m encountering JSON serialization errors. This occurs during the save operation without even attempting to render the page.

Error Messages

Receiving two different error messages during save attempts:


"'D' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."

and


"'E' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."

Letters ‘S’ and ‘P’ appeared as well as an invalid start of a value.

Steps to Reproduce

  1. Create a new page using a template with Block Grid Editor

  2. Add a BlockGridEmployees block to the grid

  3. Try to save the page

  4. Observe the error in browser console

Technical Details

The error occurs during a PUT request to /umbraco/management/api/v1/document/{id}. The save operation fails before any page rendering takes place, suggesting a serialization issue in the backoffice rather than a view rendering problem.

Repository

You can find a minimal reproduction of this issue here: C67-TEMPLATE-UPGRADE Repository Link

Additional Notes

  • This issue started occurring ONLY AFTER upgrading from Umbraco.Cms 15.1.1 to Umbraco.Cms 15.2.2

  • The error is consistent across different browsers

  • Clearing cache and removing/re-adding the Block Grid Editor doesn’t resolve the issue

Any help or guidance would be greatly appreciated!

BlockGridEmployee Structure Details

Our BlockGridEmployee implementation has a complex nested structure:

// BlockGridEmployees (Main Container)
public class BlockGridEmployees : PublishedElementModel
{
    // Primary Properties
    public string Title { get; }                    // Stores the "Titre" field
    public BlockListModel Employees { get; }        // Collection of employees
    public Link LinkCta { get; }                   // Call-to-action link
}

// EmployeCategorie (Category Group)

public class EmployeCategorie : PublishedElementModel
{
    public string Titre { get; }                // Category Title (ex: Direction, Administration, Development)
    public string SousTitre { get; }           // Category Subtitle
    public IEnumerable<IPublishedContent> ListeDemployes { get; }  // Employee List
}

// Employe (Employee Details)
public class Employe : PublishedContentModel
{
    public string Prenom { get; }              // First Name
    public string Nom { get; }                 // Last Name
    public string Poste { get; }               // Position
    public string LinkedIn { get; }            // LinkedIn Profile
    public MediaWithCrops Photo { get; }       // Photo (525x415px)
    public IEnumerable<IPublishedContent> Entreprise { get; }  // Companies
}

// Entreprise (Company Details)
public class Entreprise : PublishedContentModel
{
    public string Nom { get; }                 // Company Name
    public string Email { get; }               // Contact Email
    public Link Lien { get; }                 // Company Website
    public MediaWithCrops Image { get; }      // Company Logo
}

The structure represents a deeply nested Block Grid setup:

  1. BlockGridEmployees contains a list of EmployeCategorie
  2. Each EmployeCategorie contains a list of Employe
  3. Each Employe is associated with one or more Entreprise

This complex nesting of BlockList models within the Block Grid might be relevant to the serialization issues we’re experiencing during save operations.

Should be 9.0 :wink:

1 Like

I can see the example repo indeed has a reproduction in it, doesn’t work for me either. Which is good news, makes it easier to debug, great job!

However, could you please past this report in the issue tracker, that’s where the team will be looking at bugs:

Thanks!

Just leaving a link here, it’s already been reported, no need to report separately @iana-cri!

1 Like

Hello Sebastiaan! I will monitor the existant issue for further adjustements. Thank you very much!