Skip to content

Commit f28051a

Browse files
authored
Merge pull request #5 from teamneusta/fix/population-error-with-empty-id
[Fix] correct YAML export / fix missing page id in YAML
2 parents fd709ed + dd83eda commit f28051a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

config/pimcore/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ neusta_converter:
1313
properties:
1414
id:
1515
source: id
16+
skip_null: true
1617
default: 0
1718
key: ~
1819
title:

src/Documents/Export/PageExporter.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ public function toYaml(Page $page): string
3232
return $this->serializer->serialize(
3333
[self::PAGE => $yamlExportPage],
3434
'yaml',
35-
['yaml_inline' => 4, 'yaml_indent' => 4, 'yaml_flags' => self::YAML_DUMP_FLAGS],
35+
[
36+
'yaml_inline' => 4, // how many levels should be used before inline YAML
37+
'yaml_indent' => 0, // how many indentations should be used from the very beginning
38+
'yaml_flags' => self::YAML_DUMP_FLAGS,
39+
]
3640
);
3741
}
3842
}

src/Documents/Export/YamlExportPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class YamlExportPage
66
{
7-
public int $id;
7+
public ?int $id = null;
88
public int $parentId;
99
public string $type = 'page';
1010
public bool $published = false;

0 commit comments

Comments
 (0)