Skip to content

Commit c3afbef

Browse files
committed
Merge branch 'release/4.3.6.1' into main
2 parents 63dc20e + 5d714a4 commit c3afbef

8 files changed

Lines changed: 27 additions & 29 deletions

File tree

‎CHANGELOG.md‎

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

3+
## 4.3.6.1 - 2023-01-09
4+
5+
- Element edit pages now retain their previous scroll position when they’re automatically refreshed to keep up with changes from another browser tab.
6+
- Fixed a bug where editing certain Matrix/Neo/Super Table fields could result in content loss. ([#12445](https://github.com/craftcms/cms/issues/12445))
7+
38
## 4.3.6 - 2023-01-04
49

510
- Template caching is no longer enabled for tokenized requests. ([#12458](https://github.com/craftcms/cms/issues/12458))

‎src/config/app.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
return [
44
'id' => 'CraftCMS',
55
'name' => 'Craft CMS',
6-
'version' => '4.3.6',
6+
'version' => '4.3.6.1',
77
'schemaVersion' => '4.0.0.9',
88
'minVersionRequired' => '3.7.11',
99
'basePath' => dirname(__DIR__), // Defines the @app alias

‎src/controllers/VolumesController.php‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ public function actionEditVolume(?int $volumeId = null, ?Volume $volume = null):
103103
])
104104
->all();
105105

106-
if (empty($fsOptions)) {
107-
$fsOptions = [
108-
109-
];
110-
}
111-
112106
return $this->asCpScreen()
113107
->title($title)
114108
->addCrumb(Craft::t('app', 'Settings'), 'settings')

‎src/helpers/Cp.php‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ public static function alerts(?string $path = null, bool $fetch = false): array
125125
}
126126
}
127127

128+
if ($licenseKeyStatus === LicenseKeyStatus::Astray) {
129+
// todo: swap Console link with a Resolve button
130+
$alerts[] = Craft::t('app', 'Your Craft license isn’t allowed to run version {version}.', [
131+
'version' => Craft::$app->getVersion(),
132+
]) . ' Please renew it from <a href="https://console.craftcms.com">Craft Console</a>.';
133+
}
134+
128135
// Any plugin issues?
129136
if ($path != 'settings/plugins') {
130137
$pluginsService = Craft::$app->getPlugins();

‎src/translations/en/app.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,7 @@
17751775
'You need to be on at least {plugin} {version} before you can update to {plugin} {targetVersion}.' => 'You need to be on at least {plugin} {version} before you can update to {plugin} {targetVersion}.',
17761776
'You need to reset your password, but an error was encountered when sending the password reset email.' => 'You need to reset your password, but an error was encountered when sending the password reset email.',
17771777
'You need to reset your password. Check your email for instructions.' => 'You need to reset your password. Check your email for instructions.',
1778+
'Your Craft license isn’t allowed to run version {version}.' => 'Your Craft license isn’t allowed to run version {version}.',
17781779
'Your Craft license key is invalid.' => 'Your Craft license key is invalid.',
17791780
'Your Email' => 'Your Email',
17801781
'Your account doesn’t have permission to access the control panel when the system is offline.' => 'Your account doesn’t have permission to access the control panel when the system is offline.',

‎src/web/assets/cp/dist/cp.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/web/assets/cp/dist/cp.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/web/assets/cp/src/js/ElementEditor.js‎

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ Craft.ElementEditor = Garnish.Base.extend(
189189
ev.data.id === this.settings.canonicalId &&
190190
!this.settings.draftId)
191191
) {
192+
Craft.setLocalStorage('scrollY', window.scrollY);
192193
window.location.reload();
193194
} else if (
194195
ev.data.event === 'deleteDraft' &&
@@ -200,6 +201,7 @@ Craft.ElementEditor = Garnish.Base.extend(
200201
if (url.href !== document.location.href) {
201202
window.location.href = url;
202203
} else {
204+
Craft.setLocalStorage('scrollY', window.scrollY);
203205
window.location.reload();
204206
}
205207
}
@@ -1620,13 +1622,7 @@ Craft.ElementEditor = Garnish.Base.extend(
16201622
'g'
16211623
),
16221624
(m, pre, id, post) => {
1623-
let duplicate = false;
1624-
try {
1625-
duplicate = this._filterFieldInputName(pre);
1626-
} catch (e) {
1627-
console.warn(`Unexpected input name: ${m}`);
1628-
}
1629-
if (!duplicate) {
1625+
if (!this._filterFieldInputName(pre)) {
16301626
return m;
16311627
}
16321628
return pre + this.duplicatedElements[id] + post;
@@ -1638,17 +1634,12 @@ Craft.ElementEditor = Garnish.Base.extend(
16381634
(m, name, id) => {
16391635
// Ignore param names that end in `[enabled]`, `[type]`, etc.
16401636
// (`[sortOrder]` should pass here, which could be set to a specific order index, but *not* `[sortOrder][]`!)
1641-
let duplicate = false;
1642-
try {
1643-
duplicate =
1644-
this._filterFieldInputName(name) &&
1645-
!name.match(
1646-
new RegExp(`${lb}(enabled|sortOrder|type|typeId)${rb}$`)
1647-
);
1648-
} catch (e) {
1649-
console.warn(`Unexpected input name: ${m}`);
1650-
}
1651-
if (!duplicate) {
1637+
if (
1638+
!this._filterFieldInputName(name) ||
1639+
name.match(
1640+
new RegExp(`${lb}(enabled|sortOrder|type|typeId)${rb}$`)
1641+
)
1642+
) {
16521643
return m;
16531644
}
16541645
return `&${name}=${this.duplicatedElements[id]}`;
@@ -1666,13 +1657,13 @@ Craft.ElementEditor = Garnish.Base.extend(
16661657
const lb = encodeURIComponent('[');
16671658
const rb = encodeURIComponent(']');
16681659
const nestedNames = name.match(
1669-
new RegExp(`(\\bfields|${lb}fields${rb})${lb}[^${rb}]+${rb}`, 'g')
1660+
new RegExp(`(\\bfields|${lb}fields${rb})${lb}.+?${rb}`, 'g')
16701661
);
16711662
if (!nestedNames) {
16721663
throw `Unexpected input name: ${name}`;
16731664
}
16741665
const lastHandle = nestedNames[nestedNames.length - 1].match(
1675-
new RegExp(`(?:\\bfields|${lb}fields${rb})${lb}([^${rb}]+)${rb}`)
1666+
new RegExp(`(?:\\bfields|${lb}fields${rb})${lb}(.+?)${rb}`)
16761667
)[1];
16771668
return Craft.fieldsWithoutContent.includes(lastHandle);
16781669
},

0 commit comments

Comments
 (0)