To reproduce
- install two drupal 8 sites, source and destination, with the standard install profile.
- copy views.view.archive.yml from /source/sites/default/files/config_*/active to /destination/sites/default/files/config_*/staging
- Go to http://destination/admin/config/development/sync and click import all(*)
- You will get a fatal error: Cannot access protected property Drupal\views\Plugin\Core\Entity\View::$api_version in /Users/tp1/Sites/drupal8dest/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php on line 469
(*) Drupal sees the imported "archive" view as different from the existing "archive" view because its UUID is different (although it is identical in all other respects).
Comment | File | Size | Author |
---|---|---|---|
#1 | 1892558-1-use-set-rather-than-access-property-directly.patch | 781 bytes | alberto56 |
Comments
Comment #1
alberto56 CreditAttribution: alberto56 commentedHere is a patch that uses set() rather than directly access properties
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedthe patch is worth investigating, but this is not a supported workflow.
you need to also push a manifest file with the new/changed view entry in it.
so i think the bug is that this was imported at all? i'm not 100% sure.
Comment #3
sunThis issue is older, but #1889854: Config import breaks on protected entity properties contains a more sophisticated patch.
Comment #4
tim.plunkettTagging with either of the tags that would have led me to this issue.