You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to be currently working as intended, as everything within Craft that calls the method is expecting the parent folder to be included in the results.
It’s obviously a bad method name though. To make amends. I’ve just given it a new $withParent argument for the next Craft 3 and 4 releases, which is true by default, but if you pass false it will omit the parent folder from the results.
What happened?
Description
Assets.php
calls$this->getAllDescendantFolders($folder)
on line 330 and passes in the$folder
.getAllDescendantFolders($folder)
creates a query using the samepath
as the parentFolderAs a result the parent is returned in the descendants:
Expected behavior
$parentFolder
should not be included in the returned results.Actual behavior
$parentFolder
is included in the returned results.Craft CMS version
4.3.6.1
PHP version
8.1
Operating system and version
13.1 (22C65)
Database type and version
MySQL
The text was updated successfully, but these errors were encountered: