Skip to content

Packaging: Fixing bad serialization for data types in packages#21043

Merged
NillasKA merged 2 commits intomainfrom
v17/bugfix/fix-package-serialization
Dec 4, 2025
Merged

Packaging: Fixing bad serialization for data types in packages#21043
NillasKA merged 2 commits intomainfrom
v17/bugfix/fix-package-serialization

Conversation

@NillasKA
Copy link
Contributor

@NillasKA NillasKA commented Dec 3, 2025

Messed my previous PR up a bit, so heres a new clean one.

Previous PR #20969

Closing #20801

Description

An issue was raised, that pointed out that when creating and downloading a package from the backoffice. The blocklist data type did not contain any other properties on a block, other than 2 IDs. The missing property mentioned in the issue was the label, however i found that a bunch of other properties were missing as well.

The initial fix for this was to manually add these properties to the configuration classes of our property editors. However this could introduce difficulties in the long run, as we'd have to maintain these configurations and keep them up to date with the frontend.

The other fix was to change the serialization to serialize the ConfigurationData rather than the ConfigurationObject. With this change in place all properties should be included in the downloaded package.xml file that appears when downloading a newly created package.

How do you test it?

Step by step:

  1. Have a blocklist data type that has a block configured with some data, perhaps a label or so.
  2. Create a package, and include this blocklist data type.
  3. Download your package.
  4. All configurations of the block should be present on the data type in the downloaded xml
  5. Create a nuget package of this, as to be able to import it again
  6. Add the package back into the original project
  7. Ensure that all the properties are still in place

@NillasKA NillasKA changed the title Changing data type serialization to datatype Packaging: Fixing bad serialization for data types in packages Dec 3, 2025
Copy link
Member

@Zeegaan Zeegaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍
Maybe a little overkill with a method just used once, but I think the clarifying comment is nice 😁

@NillasKA NillasKA merged commit 26efa52 into main Dec 4, 2025
26 checks passed
@NillasKA NillasKA deleted the v17/bugfix/fix-package-serialization branch December 4, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants