-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing BlockEditor and Relationship (#30756)
### Proposed Changes * Not load Story Block when you are inside another Story Blocks, so the Stop condition for Story Blocks is load just ID when it is a third level Story Block https://github.com/dotCMS/core/pull/30756/files#diff-a44ca86884cbc5b4cbfefc706c1ba39891814a72c266937f621ef70f231abb34R359 * Decrease the Depth when you are loading the relationship for a Second level Story Blocks , but instead of used the Methods Stacktrace to know what is the level used a new request attribute. https://github.com/dotCMS/core/pull/30756/files#diff-a44ca86884cbc5b4cbfefc706c1ba39891814a72c266937f621ef70f231abb34R352-R356 * Not used the method Stacktrace of Stop condition in the refresrReference method used the request attribute created to decrease the depth, if it is set then is because you are inside a Storyblocks already https://github.com/dotCMS/core/pull/30756/files#diff-a44ca86884cbc5b4cbfefc706c1ba39891814a72c266937f621ef70f231abb34R61-R71 * We have a problem with this test https://github.com/dotCMS/core/blob/9138599b3f8a493c3aeaba92f0ba1bfc3a904614/dotcms-integration/src/test/java/com/dotcms/contenttype/business/StoryBlockAPITest.java#L493 We try to load the A Contentlet has 2 Story Block: B and C also it is related with B. Also B is related with C When loading A with a depth of 2, B is also loaded with the same depth (2). However, C is initially loaded as a related content of B with a depth of 1. Later, C needs to be loaded again as a StoryBlock of A, this time with a depth of 2. Since C is retrieved from the cache with a depth of 1, we have temporarily removed the assertion for C when it is loaded as a StoryBlock of A by using this if condition. https://github.com/dotCMS/core/blob/9138599b3f8a493c3aeaba92f0ba1bfc3a904614/dotcms-integration/src/test/java/com/dotcms/contenttype/business/StoryBlockAPITest.java#L566 I am going to create a new issue to check it later --------- Co-authored-by: Jose Castro <[email protected]>
- Loading branch information
1 parent
e9c8559
commit 5259b9d
Showing
8 changed files
with
290 additions
and
74 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.