Skip to content

Commit

Permalink
Bugfix: Fixed JCR Query for Redirect Manager after change in redirect…
Browse files Browse the repository at this point in the history
… resource as sling:folder
  • Loading branch information
vabs95 committed Nov 24, 2024
1 parent 213279b commit 979a298
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com)

## Unreleased ([details][unreleased changes details])

### Fixed
- #3479 - Fixed JCR Query for Redirect Manager after change in "redirect" resource as "sling:Folder"

## 6.9.6 - 2024-11-20

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ public class Configurations {
private static final String REDIRECTS_RESOURCE_TYPE = "acs-commons/components/utilities/manage-redirects/redirects";

public Collection<RedirectConfiguration> getConfigurations() {
String sql = "SELECT * FROM [nt:unstructured] AS s WHERE ISDESCENDANTNODE([/conf]) "
+ "AND s.[sling:resourceType]='" + REDIRECTS_RESOURCE_TYPE + "'";
String sql = "SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(s, [/conf]) "
+ "AND s.[sling:resourceType]='" + REDIRECTS_RESOURCE_TYPE + "' "
+ "AND s.[jcr:primaryType] IN ('nt:unstructured', 'sling:folder')";

log.debug(sql);
Iterator<Resource> it = request.getResourceResolver().findResources(sql, Query.JCR_SQL2);
List<RedirectConfiguration> lst = new ArrayList<>();
Expand Down

0 comments on commit 979a298

Please sign in to comment.