lewisjenkins / craft-dynamic-fields

Populate Craft fields with dynamic data using the power of Twig.
Other
147 stars 11 forks source link

Getting error in Craft 3 - Array to string conversion #39

Open bhashkar007 opened 4 years ago

bhashkar007 commented 4 years ago

Recently, I updated from a website from Craft 2 to Craft 3 and getting error Array to string conversion while updating any entry having Dynamic field. Please see screenshot - yii_base_ErrorException

I copied stacktrace as below:

#0 /vendor/craftcms/cms/src/web/ErrorHandler.php(76): yii\base\ErrorHandler->handleError(8, 'Array to string...', '/Users/bhashkar...', 131)
#1 /storage/runtime/compiled_templates/74/74eff5136a0eeff793cb78df80998676a3b4c58e0d84fb5d21fd927987fc2424.php(131): craft\web\ErrorHandler->handleError(8, 'Array to string...', '/Users/bhashkar...', 131, Array)
#2 /vendor/twig/twig/src/Template.php(407): __TwigTemplate_2f09e23095fadb07d89219cf7c75069b790ea77c6039bee0e770d6e01aa3a124->doDisplay(Array, Array)
#3 /vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#4 /vendor/twig/twig/src/Template.php(392): Twig\Template->display(Array)
#5 /vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#6 /vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)
#7 /vendor/craftcms/cms/src/web/View.php(392): Twig\Environment->render('craft-dynamic-f...', Array)
#8 /vendor/lewisjenkins/craft-dynamic-fields/src/fields/Dropdown.php(80): craft\web\View->renderTemplate('craft-dynamic-f...', Array)
#9 /vendor/craftcms/cms/src/fieldlayoutelements/CustomField.php(251): lewisjenkins\craftdynamicfields\fields\Dropdown->getInputHtml('4', Object(craft\elements\Entry))
#10 /vendor/craftcms/cms/src/fieldlayoutelements/BaseField.php(202): craft\fieldlayoutelements\CustomField->inputHtml(Object(craft\elements\Entry), false)
#11 /vendor/craftcms/cms/src/fieldlayoutelements/CustomField.php(227): craft\fieldlayoutelements\BaseField->formHtml(Object(craft\elements\Entry), false)
#12 /vendor/craftcms/cms/src/models/FieldLayout.php(476): craft\fieldlayoutelements\CustomField->formHtml(Object(craft\elements\Entry), false)
#13 /vendor/twig/twig/src/Extension/CoreExtension.php(1499): craft\models\FieldLayout->createForm(Object(craft\elements\Entry), false)
#14 /vendor/craftcms/cms/src/helpers/Template.php(92): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\models\FieldLayout), 'createForm', Array, 'method', false, false)
#15 /storage/runtime/compiled_templates/ca/ca0a0052b5c0400eef9c5235ced7504362d9fe3cbfd023ae43c5300a5fef06d7.php(134): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\models\FieldLayout), 'createForm', Array, 'method')
#16 /vendor/twig/twig/src/Template.php(407): __TwigTemplate_c181c5af5cb30657e2dc8b35508d0ab6b7b705b5b25cee42e05018d533fcd4c5->doDisplay(Array, Array)
#17 /vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#18 /storage/runtime/compiled_templates/e4/e40ea26be3ee0c6292b288b9a8b817fdaa2135561961a9c34dc5c60abb2a8c7c.php(121): Twig\Template->display(Array, Array)
#19 /vendor/twig/twig/src/Template.php(407): __TwigTemplate_a8a56d0f12746d3f5053709fa03e218a710962cda7e721e5e33a394a191cdb44->doDisplay(Array, Array)
#20 /vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#21 /vendor/twig/twig/src/Template.php(392): Twig\Template->display(Array)
#22 /vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#23 /vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)
#24 /vendor/craftcms/cms/src/web/View.php(392): Twig\Environment->render('entries/_edit', Array)
#25 /vendor/craftcms/cms/src/web/View.php(453): craft\web\View->renderTemplate('entries/_edit', Array)
#26 /vendor/craftcms/cms/src/web/Controller.php(251): craft\web\View->renderPageTemplate('entries/_edit', Array, 'cp')
#27 /vendor/craftcms/cms/src/controllers/EntriesController.php(247): craft\web\Controller->renderTemplate('entries/_edit', Array)
#28 [internal function]: craft\controllers\EntriesController->actionEditEntry(Object(craft\models\Section), 118, NULL, NULL, Object(craft\models\Site), Object(craft\elements\Entry))
#29 /vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#30 /vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#31 /vendor/craftcms/cms/src/web/Controller.php(189): yii\base\Controller->runAction('edit-entry', Array)
#32 /vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('edit-entry', Array)
#33 /vendor/craftcms/cms/src/web/Application.php(274): yii\base\Module->runAction('entries/edit-en...', Array)
#34 /vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('entries/edit-en...', Array)
#35 /vendor/craftcms/cms/src/web/Application.php(259): yii\web\Application->handleRequest(Object(craft\web\Request))
#36 /vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#37 /html/index.php(22): yii\base\Application->run()
#38 {main}

Craft CMS v3.5.12.1 LJ Dynamic Fields v3.0.11 PHP v7.2.26

Please help.