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

Fix: first Step #30613

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

freddyDOTCMS
Copy link
Contributor

@freddyDOTCMS freddyDOTCMS commented Nov 8, 2024

Proposed Changes

  • Remove this Stop condition because it was addressing to random behavior

https://github.com/dotCMS/core/pull/30613/files#diff-a44ca86884cbc5b4cbfefc706c1ba39891814a72c266937f621ef70f231abb34L89

  • Decrease the depth when we go down into the levels

https://github.com/dotCMS/core/pull/30613/files#diff-a44ca86884cbc5b4cbfefc706c1ba39891814a72c266937f621ef70f231abb34R359-R365

  • Not use the default addRelationship method because it take the Query parameter depth value over the Request attribute value

https://github.com/dotCMS/core/pull/30613/files#diff-8120c6eddd966c9d6be3ee4dbc5af4a94bea9946b0627eb49991dde286610e49R791-R802

  • Set the Depth from the URL parameter to the attribute, we are taking it from the attribute to set the depth to any Block Editor

https://github.com/dotCMS/core/pull/30613/files#diff-95c4fca870c194a8a966d4063a39779340be2a09ccefce38ab560be274076b2fR599

  • Reset the relationship value, If the Contentlet is take from Cache then this value can be set with a different depth

https://github.com/dotCMS/core/pull/30613/files#diff-95c4fca870c194a8a966d4063a39779340be2a09ccefce38ab560be274076b2fR1303

…t the second Block Editor level is always just the Identifier
if (null != httpRequest && null == httpRequest.getAttribute(WebKeys.HTMLPAGE_DEPTH)) {
httpRequest.setAttribute(WebKeys.HTMLPAGE_DEPTH, MAX_RELATIONSHIP_DEPTH.get());

final int beginningDepthValue = getBeginningDepthValue();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to "initialDepthValue"

return depthValue;
}

public int getBeginningDepthValue(){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to getInitialDepthValue()

freddyDOTCMS and others added 9 commits November 12, 2024 15:41
…-with-relationship-field' of https://github.com/dotCMS/core into issue-30609-Storyblock-infinite-recursion-when-combined-with-relationship-field
…-with-relationship-field' of https://github.com/dotCMS/core into issue-30609-Storyblock-infinite-recursion-when-combined-with-relationship-field
…-with-relationship-field' of https://github.com/dotCMS/core into issue-30609-Storyblock-infinite-recursion-when-combined-with-relationship-field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants