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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alberto56’s picture

Title: Fatal error when importing a view » Fatal error when importing a view, using set() rather than accessing properties directly might work
Status: Active » Needs review
FileSize
781 bytes

Here is a patch that uses set() rather than directly access properties

Anonymous’s picture

Status: Needs review » Needs work

the 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.

sun’s picture

Status: Needs work » Closed (duplicate)

This issue is older, but #1889854: Config import breaks on protected entity properties contains a more sophisticated patch.

tim.plunkett’s picture

Issue tags: +VDC, +Configurables

Tagging with either of the tags that would have led me to this issue.