Skip to content

Commit

Permalink
Merge branch '5.x' into 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Dec 27, 2024
2 parents 9fc09e7 + 8f5e664 commit c09f290
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
- Fixed a bug where custom fields were getting included in rendered field layout forms, even if their `getInputHtml()` method returned an empty string.
- Fixed a bug where the password input on the Set Password page wasn’t including the “Show” button.
- Fixed a SQL error that could occur if an element was saved with a title longer than 255 characters.
- Fixed errors that could occur when working with field layouts for element types that are no longer installed. ([#16352](https://github.com/craftcms/cms/issues/16352))
- Fixed an error that could occur when creating nested entries within Matrix fields. ([#16331](https://github.com/craftcms/cms/issues/16331))
- Fixed a bug where element index View menus could include a “Use defaults” button when no view customizations had been made.
- Fixed a bug where new entries’ slugs weren’t getting propagated to other sites, if their entry type had a dynamic title format. ([#16347](https://github.com/craftcms/cms/issues/16347))
- Fixed a bug where address cards were only showing the first two lines of the address. ([#16353](https://github.com/craftcms/cms/issues/16353))
- Fixed an RCE vulnerability.

## 5.5.7 - 2024-12-17
Expand Down
4 changes: 3 additions & 1 deletion src/fieldlayoutelements/addresses/AddressField.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public function previewable(): bool
public function previewHtml(ElementInterface $element): string
{
/** @var Address $element */
return Html::tag('div', Craft::$app->getAddresses()->formatAddress($element));
return Html::tag('div', Craft::$app->getAddresses()->formatAddress($element), [
'class' => 'no-truncate',
]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/services/Drafts.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public function removeDraftData(ElementInterface $draft): void
try {
// no need to propagate or save content here – and it could end up overriding any
// content changes made to other sites from a previous onAfterPropagate(), etc.
if ($draft->hasErrors() || !Craft::$app->getElements()->saveElement($draft, false, false)) {
if ($draft->hasErrors() || !Craft::$app->getElements()->saveElement($draft, false)) {
throw new InvalidElementException($draft, "Draft $draft->id could not be applied because it doesn't validate.");
}
Db::delete(Table::DRAFTS, [
Expand Down
5 changes: 4 additions & 1 deletion src/services/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,10 @@ private function _layouts(): MemoizableArray
{
if (!isset($this->_layouts)) {
if (Craft::$app->getIsInstalled()) {
$layoutConfigs = $this->_createLayoutQuery()->all();
$layoutConfigs = $this->_createLayoutQuery()->collect()
->filter(fn(array $config) => ComponentHelper::validateComponentClass($config['type'], ElementInterface::class))
->values()
->all();
} else {
$layoutConfigs = [];
}
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.

2 changes: 1 addition & 1 deletion src/web/assets/cp/src/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3773,7 +3773,7 @@ table {
display: none;
}

& > .card-attribute-preview {
& > .card-attribute-preview:not(:has(> .no-truncate)) {
--max-lines: 2;
margin: 0;
max-height: calc(var(--lh) * var(--max-lines));
Expand Down

0 comments on commit c09f290

Please sign in to comment.