mirror of
https://github.com/getgrav/grav.git
synced 2026-02-21 05:58:01 +01:00
Fixed Flex Object saving causing the key to be lost for some types
This commit is contained in:
@@ -653,9 +653,13 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
|
||||
}
|
||||
|
||||
$storageKey = $meta['storage_key'] ?? (string)key($result);
|
||||
if ($value && $storageKey) {
|
||||
$this->setStorageKey($storageKey);
|
||||
$this->setKey($meta['key'] ?? $storageKey);
|
||||
if ($value) {
|
||||
if ($storageKey) {
|
||||
$this->setStorageKey($storageKey);
|
||||
}
|
||||
|
||||
$newKey = $meta['key'] ?? ($this->hasKey() ? $this->getKey() : null);
|
||||
$this->setKey($newKey ?? $storageKey);
|
||||
}
|
||||
|
||||
// FIXME: For some reason locator caching isn't cleared for the file, investigate!
|
||||
|
||||
Reference in New Issue
Block a user