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

Invalid argument supplied for foreach() #3

Closed freelymade closed 5 years ago

freelymade commented 5 years ago

Recently upgraded to Craft 3.1 and the latest version of SiteCopy. When trying to edit existing entries I get an "Invalid argument supplied for foreach()" error. Full stacktrace below:

yii\base\ErrorException: Invalid argument supplied for foreach() in /Users/johngilfillan/Local Sites/studiobell/vendor/goldinteractive/craft3-sitecopy/src/services/SiteCopy.php:167 Stack trace:

0 /Users/johngilfillan/Local Sites/studiobell/vendor/goldinteractive/craft3-sitecopy/src/SiteCopy.php(60): goldinteractive\sitecopy\services\SiteCopy->handleSiteCopyActiveState()

1 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/View.php(1258): goldinteractive\sitecopy\SiteCopy->goldinteractive\sitecopy{closure}()

2 /Users/johngilfillan/Local Sites/studiobell/storage/runtime/compiled_templates/47/4712e6c4f8c89f24a084497ea2b4eb3606bfc3ff375eba0407f1b0ad77054655.php(620): craft\web\View->invokeHook()

3 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Template.php(189): __TwigTemplate_987ee1de09d32c3bedf2fed727eaa847060216f8b468f14e6f12db52564a9d9d->block_details()

4 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Template.php(255): __TwigTemplate_cb3657e29d2b4b333e5bb7b817d9a78008149e2dea19df86f5c320a5f247c1c4->displayBlock()

5 /Users/johngilfillan/Local Sites/studiobell/storage/runtime/compiled_templates/f6/f617201f1bb89dacc8e1c61405902c6eab7a6f3c026a4c916117d4fb2b03f85a.php(82): __TwigTemplate_cb3657e29d2b4b333e5bb7b817d9a78008149e2dea19df86f5c320a5f247c1c4->renderBlock()

6 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Template.php(386): __TwigTemplate_cb3657e29d2b4b333e5bb7b817d9a78008149e2dea19df86f5c320a5f247c1c4->doDisplay()

7 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/twig/Template.php(49): __TwigTemplate_cb3657e29d2b4b333e5bb7b817d9a78008149e2dea19df86f5c320a5f247c1c4->displayWithErrorHandling()

8 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Template.php(363): __TwigTemplate_cb3657e29d2b4b333e5bb7b817d9a78008149e2dea19df86f5c320a5f247c1c4->displayWithErrorHandling()

9 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/twig/Template.php(31): __TwigTemplate_cb3657e29d2b4b333e5bb7b817d9a78008149e2dea19df86f5c320a5f247c1c4->display()

10 /Users/johngilfillan/Local Sites/studiobell/storage/runtime/compiled_templates/47/4712e6c4f8c89f24a084497ea2b4eb3606bfc3ff375eba0407f1b0ad77054655.php(62): __TwigTemplate_cb3657e29d2b4b333e5bb7b817d9a78008149e2dea19df86f5c320a5f247c1c4->display()

11 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Template.php(386): __TwigTemplate_987ee1de09d32c3bedf2fed727eaa847060216f8b468f14e6f12db52564a9d9d->doDisplay()

12 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/twig/Template.php(49): __TwigTemplate_987ee1de09d32c3bedf2fed727eaa847060216f8b468f14e6f12db52564a9d9d->displayWithErrorHandling()

13 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Template.php(363): __TwigTemplate_987ee1de09d32c3bedf2fed727eaa847060216f8b468f14e6f12db52564a9d9d->displayWithErrorHandling()

14 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/twig/Template.php(31): __TwigTemplate_987ee1de09d32c3bedf2fed727eaa847060216f8b468f14e6f12db52564a9d9d->display()

15 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Template.php(371): __TwigTemplate_987ee1de09d32c3bedf2fed727eaa847060216f8b468f14e6f12db52564a9d9d->display()

16 /Users/johngilfillan/Local Sites/studiobell/vendor/twig/twig/lib/Twig/Environment.php(289): __TwigTemplate_987ee1de09d32c3bedf2fed727eaa847060216f8b468f14e6f12db52564a9d9d->render()

17 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/View.php(337): craft\web\twig\Environment->render()

18 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/View.php(384): craft\web\View->renderTemplate()

19 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/Controller.php(161): craft\web\View->renderPageTemplate()

20 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/controllers/EntriesController.php(385): craft\controllers\EntriesController->renderTemplate()

21 /Users/johngilfillan/Local Sites/studiobell/vendor/yiisoft/yii2/base/InlineAction.php(57): craft\controllers\EntriesController->actionEditEntry()

22 /Users/johngilfillan/Local Sites/studiobell/vendor/yiisoft/yii2/base/InlineAction.php(57): ::call_user_func_array:{/Users/johngilfillan/Local Sites/studiobell/vendor/yiisoft/yii2/base/InlineAction.php:57}()

23 /Users/johngilfillan/Local Sites/studiobell/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams()

24 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/Controller.php(109): craft\controllers\EntriesController->runAction()

25 /Users/johngilfillan/Local Sites/studiobell/vendor/yiisoft/yii2/base/Module.php(528): craft\controllers\EntriesController->runAction()

26 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/Application.php(297): craft\web\Application->runAction()

27 /Users/johngilfillan/Local Sites/studiobell/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction()

28 /Users/johngilfillan/Local Sites/studiobell/vendor/craftcms/cms/src/web/Application.php(286): craft\web\Application->handleRequest()

29 /Users/johngilfillan/Local Sites/studiobell/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest()

30 /Users/johngilfillan/Local Sites/studiobell/web/index.php(21): craft\web\Application->run()

31 {main}