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 490b9c8
Showing 1 changed file with 4 additions and 2 deletions.
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 490b9c8

Please sign in to comment.