verbb / zen

A Craft CMS plugin to manage content across multiple environments with ease.
Other
2 stars 0 forks source link

Error when importing zip file #11

Open glenwith1n opened 1 month ago

glenwith1n commented 1 month ago

Describe the bug

I have an issue when importing getting this error - all the fields match, just seeing if I can get the latest content across. craft\elements\Entry::setTypeId(): Argument #1 ($typeId) must be of type int, null given, called in /home/webdev/www/vhosts/gtc-c4/craft/vendor/yiisoft/yii2/base/Component.php on line 180 /home/webdev/www/vhosts/gtc-c4/craft/vendor/craftcms/cms/src/elements/Entry.php:1138 /home/webdev/www/vhosts/gtc-c4/craft/vendor/yiisoft/yii2/base/Component.php:180

Steps to reproduce

  1. Export from live site
  2. Import onto dev site

Craft CMS version

4.9.5

Plugin version

1.0.4

Multi-site?

Yes

Additional context

No response

engram-design commented 1 month ago

Tricky to tell without seeing your setup, but sounds like the entryId for the entry can't be determined from the UID stored in the export. So your export should look something like:

{
    "verbb\\zen\\elements\\Entry":{
        "modified":[
            {
                "type":"craft\\elements\\Entry",
                "title":"My Entry",
                "uid":"3e685058-48c9-4565-a122-e699037cf3bb",
                "siteUid":"5cfc6bb4-bf05-46e6-bc5a-98e716fc3d71",
                "sectionUid":"432a4856-affa-4f6f-9bd3-0e9bc4b4d985",
                "typeUid":"4450dafe-0749-47a6-9e23-0270fc4faf83"
            },
            ...
        ]
    }
}

Can you verify if there's an entry type with the UID on the destination system? Zen is very strict about things being exactly the same with UID comparisons.