You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2025. It is now read-only.
I want to create a CLI to simply copy CMS Pages between Shopware instances.
Therefore I use the CmsPage Repository to search for a certain Page including associated entities (e.g. CmsSection, CmsBlock, etc.) on one shopware-instance and upload the CmsPage using Upsert to another.
I've encountered the problem that the field "Position" in "CmsBlock", which is a required numeric value and apparently allowed to be 0, is annotated with "omitempty" and therefore not included in the Upsert Payload.
Same problem occurs with other entities and changing those annotation (removing "omitempty") solves the specific issue.
Is that "omitempty" annotation for required numeric fields intentional?
Expected behaviour
Required numeric fields (like Position) should be allowed to be 0 in order to upsert them again without errors.
Steps to Reproduce?
Retrieve a CmsBlock with Position 0 using the CmsBlock Repository and upsert the same data again.