Skip to content

Using a blueprint with blocks already in them to create content duplicates the ID's of the blocks. #19352

Closed
@MatsLimetta

Description

@MatsLimetta

Which Umbraco version are you using?

13.8.1

Bug summary

When creating a new page from a blueprint (content template), where the blueprint already has pre-added blocks, the blocks in question seems to be getting the same contentUdi's stored in the database, while the actual content is different.

Specifics

First off, we have a blueprint that has predefined blocks in a blocklist property.
When creating a new page from said blueprint (I do it programmatically), everything seems to be working alright. I can update the new pages blocks without issue, and when looking at the page and getting the pages blocks from it's template, it is getting the correct information.

However, when I try to access a list of pages from the cache(Like GetDecendants() for example), and trying to show content from the blocks, I get the content from another block.
They are 2 different pages, but the GUID of the first blocklist element is the same & the content/text is the same in the new page.
When pulling the data from the DB, I can see that the content is different, but the contentUdi is the same:

Image

Steps to reproduce

  • Create a blueprint(content template) with a blocklist property and add a couple of blocks to the blueprint.
  • Create a couple of pages from this blueprint programmatically.
  • Update the blocks on the new pages with different data.
  • Get a list of the new pages and watch how you're getting some seemingly random content when trying to get the blocklist content.

Expected result / actual result

Desired outcome: Get the blocks from the actual page when getting a list of pages from the cache.
What actually happens: We get seemingly random content shown when listing the pages and trying to display their blockcontent.


This item has been added to our backlog AB#53350

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions