dgrigg / craft-migration-assistant

Migration Manager for Craft CMS
Other
27 stars 10 forks source link

Migrations of structures don't take into account the parent entry when parent is disabled #16

Closed timbertens closed 5 years ago

timbertens commented 5 years ago

I have a structure like this -- page ----- subpage1 ----- subpage2 ----- subpage3

page + 3 subpages are disabled globally

when creating a migration for these pages the field parent for the subpages has the correct parent specified in the JSON string

upon executing the migration, the parent is ignored and the subpages are created at the same level of "page". This does not occur when "page" is enabled (and that is my workaround by the way, 2 step migration. First one with page enabled + subpages. Second for just disabling the parent page)

System info

PHP version 7.3.1 OS version Linux 4.15.0-45-generic Database driver & version MySQL 5.7.25 Image driver & version GD 7.3.1 Craft edition & version Craft Pro 3.3.4.1 Yii version 2.0.21 Twig version 2.11.3 Guzzle version 6.3.3 Imagine version 1.2.3-dev

Plugins

Activity Log 1.0.1 CodeMirror 1.0.1 CP Field Inspect 1.0.6 Do It Yourself widget 2.0.1 Field Manager 2.1.0 GeoField 1.0.0 Matrix Toolbar 1.0.6 Migration Assistant 3.1.4 Redactor 2.4.0 SEOMate 1.1.0 Site Switcher 2.1.0 Stamp 2.1.0 Table Maker 2.0.1 Two-Factor Authentication 2.2.0 Typed link field 1.0.19 Wheel Form 2.3.4 Wheelform Helper 1.0.0 Wordsmith 3.0.5

dgrigg commented 5 years ago

It looks like the 'page' is getting excluded as the parent because it's a draft. A fix has been added to the latest release.