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

[BUGFIX] Make getHasChildNodeSelected recursive #4156

Open
wants to merge 1 commit into
base: release-12.0.x
Choose a base branch
from

Conversation

twojtylak
Copy link
Contributor

What this pr does

Currently, the GetHasChildNodeSelected function in \ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\OptionBased\Hierarchy\Node only checks whether a direct child is selected. With hierarchical filters, however, it makes sense to check whether any child is selected in this hierarchy branch. E.g. because this should be expanded in the frontend.

<f:if condition="{childNode.hasChildNodeSelected}">
  <f:variable name="detailsState" value="open" />
</f:if>

The PR implements this recursive check.

Fixes: #4155

@twojtylak twojtylak force-pushed the fix/make-node-get-has-child-node-selected-recursive branch 2 times, most recently from 0cac418 to fde89a4 Compare September 18, 2024 14:04
@twojtylak twojtylak changed the base branch from main to release-12.0.x September 18, 2024 14:05
@dkd-kaehm dkd-kaehm force-pushed the fix/make-node-get-has-child-node-selected-recursive branch from fde89a4 to cabde1d Compare September 19, 2024 08:07
@dkd-kaehm
Copy link
Collaborator

@twojtylak
I rebased it to current state of release-12.0.x.
Please use git reset --hard <your-remote-name>/fix/make-node-get-has-child-node-selected-recursive if you want to push something.

@twojtylak twojtylak force-pushed the fix/make-node-get-has-child-node-selected-recursive branch from cabde1d to 9191a7b Compare September 19, 2024 08:09
@dkd-kaehm
Copy link
Collaborator

The test fail because of changes in TYPO3 Fluid.

@dkd-kaehm dkd-kaehm force-pushed the fix/make-node-get-has-child-node-selected-recursive branch from 9191a7b to 7195f35 Compare September 19, 2024 10:58
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.

[BUG] Node getHasChildNodeSelected not recursive
2 participants