Skip to content

Commit 6ea3258

Browse files
committed
Merge branch '4.x' into bugfix/18552-slidepicker-and-non-standard-values
2 parents 2738bec + 2a7bd50 commit 6ea3258

3 files changed

Lines changed: 69 additions & 49 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes for Craft CMS 4
22

3+
## Unreleased
4+
5+
- Fixed an error that could occur after running the `utils/fix-field-layout-uids` command. ([#18516](https://github.com/craftcms/cms/issues/18516))
6+
37
## 4.17.10 - 2026-03-11
48

59
- Fixed an error that occurred when loading some control panel resources on environments with `craft\web\AssetManager::$cacheSourcePaths` disabled. ([#18536](https://github.com/craftcms/cms/issues/18536))
@@ -29,13 +33,12 @@
2933
- The `PDO::MYSQL_ATTR_MULTI_STATEMENTS` attribute is now set to `false` by default for database connections.
3034
- Fixed a bug where `searchindex` and `searchindexqueue` rows weren’t being deleted when an element was deleted for a site. ([#18394](https://github.com/craftcms/cms/issues/18394))
3135
- Fixed a bug where multi-select condition rules weren’t applying their “has a value” and “is empty” operators correctly. ([#18470](https://github.com/craftcms/cms/pull/18470))
32-
- Fixed a [low-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) path traversal vulnerability. (GHSA-472v-j2g4-g9h2)
3336

3437
## 4.17.6 - 2026-02-18
3538

3639
- Added `craft\serviceokens::getRemainingTokenUsages()`.
3740
- Added `craft\web\Request::getTokenRoute()`.
38-
- Fixed a [high-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) permission escalation vulnerability. (GHSA-cc7p-2j3x-x7xf)
41+
- Fixed a [high-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) permission escalation vulnerability. ([GHSA-cc7p-2j3x-x7xf](https://github.com/craftcms/cms/security/advisories/GHSA-cc7p-2j3x-x7xf))
3942

4043
## 4.17.5 - 2026-02-17
4144

@@ -44,8 +47,8 @@
4447
- Added `craft\web\Request::wants()`.
4548
- Fixed a bug where the control panel requests could trigger an infinite browser redirect loop. ([#18420](https://github.com/craftcms/cms/issues/18420))
4649
- Fixed a bug where 404 responses could be set to an image based on the `brokenImagePath` config setting for Chrome. ([#18438](https://github.com/craftcms/cms/issues/18438))
47-
- Fixed a [moderate-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) RCE vulnerability. (GHSA-4484-8v2f-5748)
48-
- Fixed a [low-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) path traversal vulnerability. (GHSA-472v-j2g4-g9h2)
50+
- Fixed a [moderate-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) RCE vulnerability. ([GHSA-4484-8v2f-5748](https://github.com/craftcms/cms/security/advisories/GHSA-4484-8v2f-5748))
51+
- Fixed a [low-severity](https://github.com/craftcms/cms/security/policy#severity--remediation) path traversal vulnerability. ([GHSA-472v-j2g4-g9h2](https://github.com/craftcms/cms/security/advisories/GHSA-472v-j2g4-g9h2))
4952

5053
## 4.17.4 - 2026-02-11
5154

composer.lock

Lines changed: 46 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/console/controllers/utils/FixFieldLayoutUidsController.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
use Craft;
1111
use craft\console\Controller;
1212
use craft\helpers\Console;
13+
use craft\helpers\ProjectConfig;
1314
use craft\helpers\StringHelper;
15+
use craft\services\ProjectConfig as ProjectConfigService;
1416
use yii\console\ExitCode;
1517

1618
/**
@@ -53,6 +55,10 @@ private function _fixUids(array $config, int &$count, string $path = '', array &
5355
{
5456
if (is_array($config['fieldLayouts'] ?? null)) {
5557
$modified = false;
58+
$packed = isset($config['fieldLayouts'][ProjectConfigService::ASSOC_KEY]);
59+
if ($packed) {
60+
$config['fieldLayouts'] = ProjectConfig::unpackAssociativeArray($config['fieldLayouts']);
61+
}
5662
foreach ($config['fieldLayouts'] as $fieldLayoutUid => &$fieldLayoutConfig) {
5763
$this->topLevelUids[$fieldLayoutUid][] = $path;
5864
if (is_array($fieldLayoutConfig)) {
@@ -61,16 +67,26 @@ private function _fixUids(array $config, int &$count, string $path = '', array &
6167
}
6268
}
6369
if ($modified) {
70+
if ($packed) {
71+
$config['fieldLayouts'] = ProjectConfig::packAssociativeArray($config['fieldLayouts']);
72+
}
6473
Craft::$app->getProjectConfig()->set($path, $config);
6574
}
6675
return;
6776
}
6877

6978
if (is_array($config['fieldLayout'] ?? null)) {
7079
$modified = false;
80+
$packed = isset($config['fieldLayout'][ProjectConfigService::ASSOC_KEY]);
81+
if ($packed) {
82+
$config['fieldLayout'] = ProjectConfig::unpackAssociativeArray($config['fieldLayout']);
83+
}
7184
$fieldLayoutPath = sprintf('%sfieldLayout', $path ? "$path." : '');
7285
$this->_fixUidsInLayout($config['fieldLayout'], $count, $fieldLayoutPath, $uids, $modified);
7386
if ($modified) {
87+
if ($packed) {
88+
$config['fieldLayout'] = ProjectConfig::packAssociativeArray($config['fieldLayout']);
89+
}
7490
Craft::$app->getProjectConfig()->set($path, $config);
7591
}
7692
return;

0 commit comments

Comments
 (0)