-
Notifications
You must be signed in to change notification settings - Fork 467
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
Fixing Template Editing bugs #28128
Merged
dsilvam
merged 24 commits into
master
from
issue-27816-Content-Displacement-Bug-when-Editing-Template
Apr 22, 2024
Merged
Fixing Template Editing bugs #28128
dsilvam
merged 24 commits into
master
from
issue-27816-Content-Displacement-Bug-when-Editing-Template
Apr 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-Displacement-Bug-when-Editing-Template
…-Displacement-Bug-when-Editing-Template
…-Displacement-Bug-when-Editing-Template
…-Displacement-Bug-when-Editing-Template
jcastro-dotcms
requested changes
Apr 16, 2024
dotCMS/src/main/java/com/dotmarketing/portlets/templates/business/TemplateAPIImpl.java
Show resolved
Hide resolved
jcastro-dotcms
approved these changes
Apr 17, 2024
dsilvam
reviewed
Apr 18, 2024
dotcms-integration/src/test/java/com/dotmarketing/factories/MultiTreeAPITest.java
Outdated
Show resolved
Hide resolved
dsilvam
reviewed
Apr 18, 2024
dotcms-integration/src/test/java/com/dotmarketing/factories/MultiTreeAPITest.java
Outdated
Show resolved
Hide resolved
dsilvam
reviewed
Apr 19, 2024
...-integration/src/test/java/com/dotmarketing/portlets/templates/business/TemplateAPITest.java
Outdated
Show resolved
Hide resolved
dsilvam
reviewed
Apr 19, 2024
...-integration/src/test/java/com/dotmarketing/portlets/templates/business/TemplateAPITest.java
Outdated
Show resolved
Hide resolved
dsilvam
reviewed
Apr 19, 2024
dotcms-integration/src/test/java/com/dotmarketing/factories/MultiTreeAPITest.java
Outdated
Show resolved
Hide resolved
dsilvam
approved these changes
Apr 19, 2024
Quality Gate passedIssues Measures |
dsilvam
deleted the
issue-27816-Content-Displacement-Bug-when-Editing-Template
branch
April 22, 2024 15:45
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before we were using this update statement
https://github.com/dotCMS/core/pull/28128/files#diff-926e9e9e22e2c282fa305bbe50022e93d9d91d6b83a5c33c8e29cacde4a0b52cL1266
to update the MultiTree, we were running this query for each UUID that need to be updated for example if we had a Layout with 2 instance of the same Containers (1 and 2) and we move the last one to the top we need to run the follow queries:
UPDATE multi_tree set relation_type = 1 WHERE parent1 in (...) AND parent2 = 'container ID' AND relation_type = 2
UPDATE multi_tree set relation_type = 2 WHERE parent1 in (...) AND parent2 = 'container ID' AND relation_type = 1
so it can cause that all the MultiTree finish with the same relation_type
Also we have two Resource where the Layout can be changed but this two Ed points are not reusing code.
Proposed Changes
https://github.com/dotCMS/core/pull/28128/files#diff-448b3630547f743e0d556752c2e68b797b03e9c4b9d7e238c84889274435635eR338
https://github.com/dotCMS/core/pull/28128/files#diff-c74cebd0e6210e5d55c1e765543514a52f84f3f312277ddd3c80d21680fb545cR375
https://github.com/dotCMS/core/pull/28128/files#diff-926e9e9e22e2c282fa305bbe50022e93d9d91d6b83a5c33c8e29cacde4a0b52cR1305-R1311
here I explain exactly what I am doing
https://github.com/dotCMS/core/pull/28128/files#diff-926e9e9e22e2c282fa305bbe50022e93d9d91d6b83a5c33c8e29cacde4a0b52cR1305-R1311