From 2ab2027f245dfd24b500ed3c0de3cfa38501f873 Mon Sep 17 00:00:00 2001 From: i-just Date: Thu, 8 Jan 2026 10:20:26 +0100 Subject: [PATCH 1/2] check the actual query limit, not one adjusted for the folders count --- src/elements/Asset.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/elements/Asset.php b/src/elements/Asset.php index 6818b4fcb6d..91a0d4b0989 100644 --- a/src/elements/Asset.php +++ b/src/elements/Asset.php @@ -643,6 +643,7 @@ protected static function prepElementQueryForTableAttribute(ElementQueryInterfac protected static function indexElements(ElementQueryInterface $elementQuery, ?string $sourceKey): array { $assets = []; + $originalLimit = $elementQuery->limit; // Include folders in the results? /** @var AssetQuery $elementQuery */ @@ -726,7 +727,7 @@ protected static function indexElements(ElementQueryInterface $elementQuery, ?st // return the folders directly if ( self::isFolderIndex() || - count($assets) === (int)$elementQuery->limit + count($assets) === (int)$originalLimit ) { return $assets; } From b78664ba021f7750c4ab5b063ba87a131009eda9 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Fri, 9 Jan 2026 06:37:13 -0800 Subject: [PATCH 2/2] Release note [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 692d494a405..1957fc61648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed a bug where all plugin settings were being saved to the project config, rather than just posted settings. ([craftcms/commerce#4006](https://github.com/craftcms/commerce/issues/4006)) - Fixed a bug where custom selects could be positioned incorrectly after the window was resized. ([#18179](https://github.com/craftcms/cms/issues/18179)) - Fixed an error that could occur when logging a deprecation warning, if the backtrace contained any non-UTF-8-encoded strings. ([#18218](https://github.com/craftcms/cms/issues/18218)) +- Fixed a bug where it wasn’t possible to view assets if they had exactly 50 subfolders alongside them. ([#18213](https://github.com/craftcms/cms/issues/18213)) - Fixed SSRF vulnerabilities. (GHSA-96pq-hxpw-rgh8, GHSA-m5r2-8p9x-hp5m, GHSA-8jr8-7hr4-vhfx) - Fixed a SQL injection vulnerability. (GHSA-2453-mppf-46cj) - Fixed an XSS vulnerability. (GHSA-9f5h-mmq6-2x78)