Browse Source

Fixed #12695

Resolves #12805
bugfix/13143-element-index-table-wrap
brandonkelly 2 years ago
parent
commit
138a85aa71
No known key found for this signature in database GPG Key ID: 5E86D0CED64C7093
  1. 1
      CHANGELOG.md
  2. 24
      src/elements/Asset.php

1
CHANGELOG.md

@ -9,6 +9,7 @@
- Fixed a bug where element labels could bleed out of their container. ([#13099](https://github.com/craftcms/cms/issues/13099))
- Fixed an error that occurred if `yii\web\UrlManager::addRules()` was called on a console request. ([#13109](https://github.com/craftcms/cms/issues/13109))
- Fixed a bug where it was possible to select the current folder as the target when moving a volume folder, resulting in the folder and its contents being lost. ([#13118](https://github.com/craftcms/cms/issues/13118))
- Fixed a bug where custom field values weren’t getting saved for assets in the local temp upload location. ([#12695](https://github.com/craftcms/cms/issues/12695))
## 3.8.7 - 2023-04-11

24
src/elements/Asset.php

@ -1477,6 +1477,18 @@ class Asset extends Element
}
$volume = $this->getVolume();
if ($volume instanceof Temp) {
// See if a default field layout ID was posted
$fieldLayoutId = Craft::$app->getRequest()->getBodyParam('defaultFieldLayoutId');
if ($fieldLayoutId) {
$fieldLayout = Craft::$app->getFields()->getLayoutById($fieldLayoutId);
if ($fieldLayout) {
return $fieldLayout;
}
}
}
return $volume->getFieldLayout();
}
@ -2186,18 +2198,6 @@ class Asset extends Element
return implode("\n", $components);
}
/**
* @inheritdoc
*/
public function getEditorHtml(): string
{
if (!$this->fieldLayoutId) {
$this->fieldLayoutId = Craft::$app->getRequest()->getBodyParam('defaultFieldLayoutId');
}
return parent::getEditorHtml();
}
/**
* @inheritdoc
*/

Loading…
Cancel
Save