diff --git a/HOTFIX_TRACKING.md b/HOTFIX_TRACKING.md index 3a29c13e93af..486c8a6d40ec 100644 --- a/HOTFIX_TRACKING.md +++ b/HOTFIX_TRACKING.md @@ -150,4 +150,5 @@ This maintenance release includes the following code fixes: **Release-22.03.8** 126. https://github.com/dotCMS/core/issues/25258 : WYSIWYG not adding images when it's not default lang #25258 -127. https://github.com/dotCMS/core/issues/25224 : PP - Integrity Checker, fixing conflicts is setting up identifier columns as null #25224 \ No newline at end of file +127. https://github.com/dotCMS/core/issues/25224 : PP - Integrity Checker, fixing conflicts is setting up identifier columns as null #25224 +128. https://github.com/dotCMS/core/issues/25136 : Site Browser is not sorting items by default #25136 \ No newline at end of file diff --git a/dotCMS/src/main/java/com/dotmarketing/portlets/browser/ajax/BrowserAjax.java b/dotCMS/src/main/java/com/dotmarketing/portlets/browser/ajax/BrowserAjax.java index 47ebcdf7972a..25caced602ff 100644 --- a/dotCMS/src/main/java/com/dotmarketing/portlets/browser/ajax/BrowserAjax.java +++ b/dotCMS/src/main/java/com/dotmarketing/portlets/browser/ajax/BrowserAjax.java @@ -107,8 +107,8 @@ public class BrowserAjax { private static String SELECTED_BROWSER_PATH_OBJECT = "SELECTED_BROWSER_PATH_OBJECT"; Set openFolders = new LinkedHashSet<>(); - String lastSortBy = "name"; - boolean lastSortDirectionDesc = false; + String lastSortBy = "modDate"; + boolean lastSortDirectionDesc = true; final static private Comparator nameComparator = new Comparator() { public int compare(Map o1, Map o2) { @@ -323,9 +323,8 @@ public List> openFolderContent (String parentInode, String s activeFolderInode = null != siteBrowserActiveFolderInode?siteBrowserActiveFolderInode:parentInode; - this.lastSortBy = sortBy; - if (sortBy != null && UtilMethods.isSet(sortBy)) { + this.lastSortBy = sortBy; if (sortBy.equals(lastSortBy)) { this.lastSortDirectionDesc = !this.lastSortDirectionDesc; }