OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.37k stars 2.37k forks source link

Default content parts sort order should be base on the insertion position #16515

Open MikeAlhayek opened 1 month ago

MikeAlhayek commented 1 month ago

Describe the bug

I create a new content type (Member) by attaching TitlePart only. Then Added Biography field. Note here I did not change the order of the parts yes using the drag/drop. So every thing is left as is. As you can see from the following screenshot, I would expect that the fields to be rendered below the title part since Title part shows us on the top of the parts list.

image

However, when I try to create a member, Title part renders after the biography.

image

Now, if I edit the member content type and drag the title part below "Member" and move it back to it's original spot then save, everything shows up as expected.

image

Orchard Core version

This issue is in main branch but I think goes back to previous versions.

Expected behavior

By default, the fields should be rendered in the position of the MemeberPart that is added by default. Parts should also be rendered in the order they appear in the content type editor "unless someone overrides this using display driver or placement"/

sebastienros commented 1 month ago

The parts position in the content type definition might not be set correctly when a part is added. We need to compare the json before and after the parts are re-ordered.

github-actions[bot] commented 1 month ago

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.