Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Duplicate data when creating template #6

Open
thientu995 opened this issue Dec 9, 2022 · 2 comments
Open

[Bug]: Duplicate data when creating template #6

thientu995 opened this issue Dec 9, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@thientu995
Copy link

thientu995 commented Dec 9, 2022

What browsers are you seeing the problem on?

No response

What happened?

Hi everyone!

I am using this source example and creating more Block Grid Content Template (available in source).

Right at the BlockGrid.cshtml file, I added my line of code as follows:

@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.BlockGrid>
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels;
@{
    Layout = "Layout.cshtml";
}

@await Html.GetBlockGridHtmlAsync(Model.Content)

@{
    var children = Model.Children;
    if (children.Any())
    {
        foreach (var item in children)
        {
    <div style="padding-top:1000px">
        @await Html.GetBlockGridHtmlAsync((item as ContentModels.BlockGrid).Content);
    </div>
        }
    }
}

Then I immediately created 5 templates with another content in page Home:
image

Then return to my homepage to see the results, duplicate previous data is hard to understand?

Video Demo: https://drive.google.com/file/d/1tSUKe74nQVZNjgRZbXjVp5r_EfJcVUpu/view?usp=sharing

Source code: https://drive.google.com/file/d/1gS6DL6il58eYRM8-pUwLdE133KmEzKg0/view?usp=sharing

It seems that this problem is similar to BlockList: umbraco/Umbraco-CMS#13413

Thanks!

@thientu995 thientu995 added the bug Something isn't working label Dec 9, 2022
@nielslyngsoe
Copy link
Member

Hi @thientu995

Thanks for reporting this issue, it seems very much like a general problem with Block Grid Editor and the Content Templates.

I'll make sure we have a look at it.

Thanks

@warrenbuckley
Copy link
Contributor

@nielslyngsoe have you created an issue on the main CMS repo and dealing with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants