We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0eb470c commit fcc513fCopy full SHA for fcc513f
index.php
@@ -55,9 +55,12 @@
55
],
56
'pageMethods' => [
57
'updateCategoriesStructure' => function($fieldname) {
58
- $newFieldContent = $this->$fieldname()->yaml()[0];
59
- foreach(kirby()->languages() as $l) {
60
- $this->save([$fieldname => $newFieldContent], $l->code());
+ $fieldContent = $this->$fieldname()->yaml();
+ if(count($fieldContent) == 2 && is_int($fieldContent[1])) {
+ $newFieldContent = $fieldContent[0];
61
+ foreach(kirby()->languages() as $l) {
62
+ $this->save([$fieldname => $newFieldContent], $l->code());
63
+ }
64
}
65
},
66
0 commit comments