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

Template Builder: Container Layout Editing Issue #26413

Closed
fmontes opened this issue Oct 10, 2023 · 7 comments · Fixed by #27391
Closed

Template Builder: Container Layout Editing Issue #26413

fmontes opened this issue Oct 10, 2023 · 7 comments · Fixed by #27391

Comments

@fmontes
Copy link
Member

fmontes commented Oct 10, 2023

Problem Statement

When editing the layout of a page, content is being moved around when the same containers are used in all the boxes.

Steps to Reproduce

Kapture.2023-10-10.at.12.24.49.mp4

Acceptance Criteria

  1. The same containers should be able to be used in all boxes on a page.
  2. Content should remain consistent with the UUID.

External Links

N/A

Assumptions & Initiation Needs

N/A

Quality Assurance Notes & Workarounds

  1. Check if there is an issue in the frontend with sending bad data, or an issue in the backend.
@zJaaal
Copy link
Contributor

zJaaal commented Oct 10, 2023

It looks like we are updating the uuids of same containers everytime we add/remove one, maybe we are losing the reference of the content in this process. Here is a video:

Screen.Recording.2023-10-10.at.4.56.36.PM-1.mov

@hmoreras hmoreras self-assigned this Jan 5, 2024
@hmoreras
Copy link
Contributor

hmoreras commented Jan 5, 2024

Found this scenario that happens consistently, the content comes back after delete the container and create a new one. we are not cleaning references in the BE

Screenshare.-.2024-01-05.5_28_14.PM.mp4

@hmoreras hmoreras removed their assignment Jan 9, 2024
@freddyDOTCMS
Copy link
Contributor

The current behavior is that when we remove a Container that has Contentlets inside it the relationship between the Contentlet, page and container is mark as orphan instead of be removed , then if the Container is add back inside the page on the future these Contentlets are going to be back on the page too.

In a meeting where participated: @fmontes and @wezell , we decided that the fix is going to be:

  • Change the Default behavior and remove the relationship when the Container is removed
  • Allow to set a flag to keep the current behavior, it means mark the relationship as orphan.

@fmontes
Copy link
Member Author

fmontes commented Jan 17, 2024

The default value of the flag will be the new behavior.

@jcastro-dotcms
Copy link
Contributor

jcastro-dotcms commented Jan 20, 2024

NOTE TO QA

In order to check that the fix is working, watch the video attached by @hmoreras which perfectly describes the scenario that must NOT happen anymore. From now on, previously added content must not show up after a Container has been removed.

The name of the flag is:

DELETE_ORPHANED_CONTENTS_FROM_CONTAINER

If you want to bring the old behavior back, just set it to false.

github-merge-queue bot pushed a commit that referenced this issue Jan 25, 2024
…ng orphaned Contentlets (#27391)

Co-authored-by: Freddy Montes <751424+fmontes@users.noreply.github.com>
@rjvelazco rjvelazco self-assigned this Feb 7, 2024
@rjvelazco
Copy link
Contributor

Passed Internal QA

  • Tested on Docker: dotcms:master_b4779ec

Video

fix-issue-26413-template-builder-container-layout-editing-issue.mov

@josemejias11
Copy link

Approved: Tested on master_917a29e, Docker, macOS 13.0, FF v121.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment