Skip to content

Commit

Permalink
Merge branch 'release/4.4.11' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 15, 2023
2 parents d51831d + 32c34b1 commit 0fd0229
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release Notes for Craft CMS 4

## 4.4.11 - 2023-05-15

- Fixed a bug where Matrix blocks weren’t getting propagated to newly-added sites for entries. ([#13181](https://github.com/craftcms/cms/issues/13181))
- Fixed a SQL error that could occur when updating to Craft 4.4 on PostgreSQL. ([#13186](https://github.com/craftcms/cms/issues/13186))
- Fixed a bug where `craft\helpers\StringHelper::isUtf8()` was unreliable.
- Fixed a styling issue with Date fields. ([#13182](https://github.com/craftcms/cms/issues/13182))

## 4.4.10.1 - 2023-05-10

- Fixed a bug where it wasn’t possible to add new Matrix blocks via the “Add a block” menu. ([#13177](https://github.com/craftcms/cms/issues/13177))
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.4.10.1',
'version' => '4.4.11',
'schemaVersion' => '4.4.0.4',
'minVersionRequired' => '3.7.11',
'basePath' => dirname(__DIR__), // Defines the @app alias
Expand Down
7 changes: 3 additions & 4 deletions src/helpers/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,7 @@ public static function convertToUtf8(string $str): string
if (App::checkForValidIconv()) {
$str = HtmlPurifier::convertToUtf8($str, $config);
} else {
$encoding = static::encoding($str);
$str = mb_convert_encoding($str, 'utf-8', $encoding);
$str = mb_convert_encoding($str, self::UTF8);
}

return $str;
Expand Down Expand Up @@ -460,7 +459,7 @@ public static function encodeMb4(string $str): string
// So, by converting from UTF-8 to UTF-32, we magically
// get the correct hex encoding.
return static::replaceMb4($str, static function($char) {
$unpacked = unpack('H*', mb_convert_encoding($char, 'UTF-32', 'UTF-8'));
$unpacked = unpack('H*', mb_convert_encoding($char, 'UTF-32', self::UTF8));
return isset($unpacked[1]) ? '&#x' . ltrim($unpacked[1], '0') . ';' : '';
});
}
Expand Down Expand Up @@ -815,7 +814,7 @@ public static function isUpperCase(string $str): bool
*/
public static function isUtf8(string $str): bool
{
return static::encoding($str) === 'utf-8';
return mb_check_encoding($str, self::UTF8);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function safeUp()
{
if ($this->db->columnExists(Table::PLUGINS, 'licenseKeyStatus')) {
if ($this->db->getIsPgsql()) {
$this->execute(sprintf('alter table %s drop constraint %s', Table::PLUGINS, '{{%plugins_licenseKeyStatus_check}}'));
$this->execute(sprintf('alter table %s drop constraint if exists %s', Table::PLUGINS, '{{%plugins_licenseKeyStatus_check}}'));
}
$this->dropColumn(Table::PLUGINS, 'licenseKeyStatus');
}
Expand Down
13 changes: 6 additions & 7 deletions src/services/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,12 @@ public function saveField(MatrixField $field, ElementInterface $owner): void
/** @var MatrixBlock[] $blocks */
foreach ($blocks as $block) {
$sortOrder++;
if (
// skip blocks that are primarily owned by a different element
($saveAll && (!$block->primaryOwnerId || $block->primaryOwnerId === $owner->id)) ||
!$block->id ||
$block->dirty
) {
$block->primaryOwnerId = $block->ownerId = $owner->id;
if ($saveAll || !$block->id || $block->dirty) {
$block->ownerId = $owner->id;
// If the block already has an ID and primary owner ID, don't reassign it
if (!$block->id || !$block->primaryOwnerId) {
$block->primaryOwnerId = $owner->id;
}
$block->sortOrder = $sortOrder;
$elementsService->saveElement($block, false);

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/web/assets/cp/src/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3608,7 +3608,7 @@ table.editable {
.datewrapper,
.timewrapper {
display: block;
width: 100%;
width: calc(100% - 29px);

.text + div[data-icon] {
top: 6px;
Expand Down Expand Up @@ -6734,6 +6734,10 @@ body .selectize-dropdown {
}
}

.datetimewrapper .selectize.select:not(.fullwidth) {
max-width: calc(100% - 29px);
}

.selectize.select .selectize-control {
@include select-container-styles;

Expand Down

0 comments on commit 0fd0229

Please sign in to comment.