Closed waqasakramdot closed 1 month ago
The behavior is expected in the first case:
#set($f= $website.getFolder('/', '48190c8c-42c4-46af-8d1a-0cd5db894797'))
#set($ff= $website.getSubFolders($f))
$ff // here empty list
dotCMS by design doesn't return a different root folder for every site, it only uses one system folder that is the one root folder on the system, and it belong to the System Host. So this line:
#set($f= $website.getFolder('/', '48190c8c-42c4-46af-8d1a-0cd5db894797'))
Returns the system folder, and this other line:
#set($ff= $website.getSubFolders($f))
Returns an empty list of sub folders for the system folder, as expected.
On the other hand, for the second case, it is a bug because this code should return the sub folder list under the host root path:
#set($f= $website.getSubFolders('/', '48190c8c-42c4-46af-8d1a-0cd5db894797'))
$f // here empty list as well
The second case that was a bug is returning the correct sub folder list
Approved: Tested on trunk_9af96d6, Docker, macOS 14.5, FF v126.0.1
#set($f= $website.getFolder('/', '48190c8c-42c4-46af-8d1a-0cd5db894797'))
$f
com.dotmarketing.portlets.folders.model.Folder@67202dd2[
identifier=bc9a1d37-dd2d-4d49-a29d-0c9be740bfaf,
name=system folder,
sortOrder=0,
showOnMenu=false,
hostId=SYSTEM_HOST,
type=folder,
title=System folder,
filesMasks=,
defaultFileType=33888b6f-7a8e-4069-b1b6-5c1aa9d0a48d,
modDate=2017-03-07 18:25:58.116,
owner=system,
iDate=2009-10-08 20:27:18.0,
inode=SYSTEM_FOLDER,
path=/
]
Parent Issue
No response
Problem Statement
website viewtool to get the first tier sub-folder using root ('/') it always returns an empty list.
Steps to Reproduce
Acceptance Criteria
It should return all first-tier subfolders that live under root.
dotCMS Version
23., 24. - 24.04.05
Proposed Objective
Customer Support
Proposed Priority
Priority 4 - Trivial
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
https://dotcms.zendesk.com/agent/tickets/115683
The workaround would be to use REST API to get first-tier subfolders, then use website viewtool.
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response