Goldinteractive / craft3-sitecopy

With this plugin you can copy the content of an entry to another site.
MIT License
22 stars 6 forks source link

Error trying to copy Globals set to other sites #23

Closed benface closed 4 years ago

benface commented 4 years ago

Trying to access array offset on value of type int in SiteCopy.php:223

yii\base\ErrorException: Trying to access array offset on value of type int in /home/ubuntu/sites/fleurisites/vendor/goldinteractive/craft3-sitecopy/src/services/SiteCopy.php:223
Stack trace:
#0 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/web/ErrorHandler.php(76): yii\base\ErrorHandler->handleError()
#1 /home/ubuntu/sites/fleurisites/vendor/goldinteractive/craft3-sitecopy/src/services/SiteCopy.php(223): craft\web\ErrorHandler->handleError()
#2 /home/ubuntu/sites/fleurisites/vendor/goldinteractive/craft3-sitecopy/src/SiteCopy.php(86): goldinteractive\sitecopy\services\SiteCopy->syncElementContent()
#3 [internal function]: goldinteractive\sitecopy\SiteCopy->goldinteractive\sitecopy\{closure}()
#4 /home/ubuntu/sites/fleurisites/vendor/yiisoft/yii2/base/Event.php(312): call_user_func()
#5 /home/ubuntu/sites/fleurisites/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger()
#6 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/services/Elements.php(2470): yii\base\Component->trigger()
#7 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/services/Elements.php(691): craft\services\Elements->_saveElementInternal()
#8 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/controllers/GlobalsController.php(252): craft\services\Elements->saveElement()
#9 [internal function]: craft\controllers\GlobalsController->actionSaveContent()
#10 /home/ubuntu/sites/fleurisites/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#11 /home/ubuntu/sites/fleurisites/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams()
#12 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/web/Controller.php(181): yii\base\Controller->runAction()
#13 /home/ubuntu/sites/fleurisites/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction()
#14 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/web/Application.php(294): yii\base\Module->runAction()
#15 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/web/Application.php(597): craft\web\Application->runAction()
#16 /home/ubuntu/sites/fleurisites/vendor/craftcms/cms/src/web/Application.php(273): craft\web\Application->_processActionRequest()
#17 /home/ubuntu/sites/fleurisites/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest()
#18 /home/ubuntu/sites/fleurisites/public_html/index.php(21): yii\base\Application->run()
#19 {main}
lukasNo1 commented 4 years ago

I cannot reproduce the issue. However, i released a new version 0.6.1 which should fix the issue. Can you test if this version works for you?

benface commented 4 years ago

Yes, the update fixed it. Thank you @lukasNo1!