Skip to content

Commit

Permalink
Merge branch '4.x' into 4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 11, 2024
2 parents c18ab45 + 74f6a2d commit 83d886d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Release Notes for Craft CMS 4

## Unreleased
## 4.12.1 - 2024-09-06

- Added `craft\services\Security::isSystemDir()`.
- Fixed a bug where `craft\helpers\StringHelper::lines()` was returning an array of `Stringy\Stringy` objects, rather than strings.
- Fixed styling issues with Template field layout UI elements’ selector labels.
- Fixed a validation error that could occur when saving a relational field, if the “Maintain hierarchy” setting had been enabled but was no longer applicable. ([#15666](https://github.com/craftcms/cms/issues/15666))
- Fixed a bug where formatted addresses weren’t using the application locale consistently. ([#15668](https://github.com/craftcms/cms/issues/15668))
- Fixed a bug where Tip and Warning field layout UI elements would display in field layouts even if they had no content. ([#15681](https://github.com/craftcms/cms/issues/15681))
- Fixed an error that could occur when reverting an element’s content from a revision, if the element had been added to additional sites since the time the revision was created. ([#15679](https://github.com/craftcms/cms/issues/15679))
- Fixed an information disclosure vulnerability.

## 4.12.0 - 2024-09-03
Expand Down
2 changes: 1 addition & 1 deletion src/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [
'id' => 'CraftCMS',
'name' => 'Craft CMS',
'version' => '4.12.0',
'version' => '4.12.1',
'schemaVersion' => '4.5.3.0',
'minVersionRequired' => '3.7.11',
'basePath' => dirname(__DIR__), // Defines the @app alias
Expand Down
6 changes: 5 additions & 1 deletion src/services/Elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -3668,7 +3668,11 @@ private function _propagateElement(
$siteElement->siteSettingsId = null;
$siteElement->contentId = null;
$siteElement->setEnabledForSite($siteInfo['enabledByDefault']);
$siteElement->isNewForSite = true;
// set isNewForSite to true unless we're reverting content from a revision
// in which case, it's possible that the canonical element exists for the site already,
// but didn't back when the revision was created.
// (see https://github.com/craftcms/cms/issues/15679)
$siteElement->isNewForSite = !$siteElement->duplicateOf?->getIsRevision();

// Keep track of this new site ID
$element->newSiteIds[] = $siteInfo['siteId'];
Expand Down

0 comments on commit 83d886d

Please sign in to comment.