I'm unable to install the Magento 2 sample data via the CLI, this is after Magento 2 has already been installed. Currently on 2.1.1.
The steps I've taken:
php bin/magento sampledata:deploy
php bin/magento setup:upgrade
The setup:upgrade
command fails with the following error:
...
Module 'Magento_GiftMessageStaging':
Module 'Magento_CatalogStaging':
Module 'Magento_GiftRegistrySampleData':
Installing data... PHP Fatal error: Uncaught Error: Call to a member function getData() on boolean in /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Model/GiftRegistry.php:192
Stack trace:
#0 /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Model/GiftRegistry.php(144): Magento\GiftRegistrySampleData\Model\GiftRegistry->generateData(Array)
#1 /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Setup/Installer.php(30): Magento\GiftRegistrySampleData\Model\GiftRegistry->install(Array)
#2 [internal function]: Magento\GiftRegistrySampleData\Setup\Installer->install()
#3 /var/www/vhosts/projectname/production/htdocs/vendor/magento/framework/App/State.php(171): call_user_func_array(Array, Array)
#4 /var/www/vhosts/projectname/production/htdocs/vendor/magento/framework/Setup/SampleData/Executor.php(50): Magento\Framework\App\State->emulateAreaCode('setup', Array)
#5 /var/www/vhosts/projectname/production/htdocs/vendor/magento/module in /var/www/vhosts/projectname/production/htdocs/vendor/magento/module-gift-registry-sample-data/Model/GiftRegistry.php on line 192
Does anyone know how this is resolved? I'm a front-end developer so I'm not too great at spotting the errors in PHP.
Thanks,
Ben