Closed sandrodunkel closed 1 year ago
So according to the error, the review contains a reference to a draft entry with the ID of 7
. That no longer exists on your install for whatever reason. However, this is reasonably normal, because drafts do get deleted when merged. It's likely that Workflow for Craft 3 just didn't provide a proper cleanup when the draft was deleted. Or, there was lacking foreign key checks.
However, I've added some checks to prevent the migration from failing. To get this early, run composer require verbb/workflow:"dev-craft-4 as 2.0.4"
Worked like a charm – thank you very much! I assume that this will also be part of an upcoming update (instead of running the dev-version for ages)?
Actually, if I open some of the older workflows that already exist, on some of them I get the following error. It's not all of them and I can't seem to figure out a pattern.
LitEmoji\LitEmoji::shortcodeToUnicode(): Argument #1 ($content) must be of type string, null given, called in /vendor/verbb/workflow/src/helpers/StringHelper.php on line 25
Can you provide the full stack trace of the error? Just need to backtrack to where it's coming from.
Just pushed a fix for this in the meantime. To get this early, run composer require verbb/workflow:"dev-craft-4 as 2.0.4"
- and yes this will be added to the next release, so you can switch back from the dev-craft-4
branch when released.
TypeError: LitEmoji\LitEmoji::shortcodeToUnicode(): Argument #1 ($content) must be of type string, null given, called in /vendor/verbb/workflow/src/helpers/StringHelper.php on line 25 and defined in /vendor/elvanto/litemoji/src/LitEmoji.php:62
Stack trace:
#0 /vendor/verbb/workflow/src/helpers/StringHelper.php(25): LitEmoji\LitEmoji::shortcodeToUnicode(NULL)
#1 /vendor/verbb/workflow/src/models/Review.php(98): verbb\workflow\helpers\StringHelper::unSanitizeNotes(NULL)
#2 /vendor/yiisoft/yii2/base/Component.php(139): verbb\workflow\models\Review->getNotes()
#3 /vendor/craftcms/cms/src/helpers/Template.php(135): yii\base\Component->__get('notes')
#4 /storage/runtime/compiled_templates/2c/2c6ded66470dbabd7912b47e146a3a31.php(340): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(verbb\workflow\models\Review), 'notes', Array)
#5 /vendor/twig/twig/src/Template.php(171): __TwigTemplate_e157e1edad6583a0c99dc35fa40d1bfb->block_main(Array, Array)
#6 /storage/runtime/compiled_templates/55/556236f1081c0bc3773dd133218ba935.php(376): Twig\Template->displayBlock('main', Array, Array)
#7 /vendor/twig/twig/src/Template.php(171): __TwigTemplate_28186521361488afc295cf1c51d67982->block_body(Array, Array)
#8 /storage/runtime/compiled_templates/97/973b2173bc30e762897596e7e71a2941.php(94): Twig\Template->displayBlock('body', Array, Array)
#9 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_65bc4559dd5525e31f19d5db02ee7c00->doDisplay(Array, Array)
#10 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#11 /storage/runtime/compiled_templates/82/82a292e03adf38af20bc6c2bc4ea7cc5.php(56): Twig\Template->display(Array, Array)
#12 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_c89542fdbb0c8c6a910c5f4a9ec44531->doDisplay(Array, Array)
#13 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#14 /storage/runtime/compiled_templates/55/556236f1081c0bc3773dd133218ba935.php(179): Twig\Template->display(Array, Array)
#15 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_28186521361488afc295cf1c51d67982->doDisplay(Array, Array)
#16 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#17 /storage/runtime/compiled_templates/2c/2c6ded66470dbabd7912b47e146a3a31.php(104): Twig\Template->display(Array, Array)
#18 /vendor/twig/twig/src/Template.php(394): __TwigTemplate_e157e1edad6583a0c99dc35fa40d1bfb->doDisplay(Array, Array)
#19 /vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#20 /vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#21 /vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render(Array, Array)
#22 /vendor/twig/twig/src/Environment.php(277): Twig\TemplateWrapper->render(Array)
#23 /vendor/craftcms/cms/src/web/View.php(456): Twig\Environment->render('workflow/submis...', Array)
#24 /vendor/craftcms/cms/src/web/View.php(509): craft\web\View->renderTemplate('workflow/submis...', Array)
#25 /vendor/craftcms/cms/src/web/TemplateResponseFormatter.php(56): craft\web\View->renderPageTemplate('workflow/submis...', Array, 'cp')
#26 /vendor/yiisoft/yii2/web/Response.php(1098): craft\web\TemplateResponseFormatter->format(Object(craft\web\Response))
#27 /vendor/craftcms/cms/src/web/Response.php(286): yii\web\Response->prepare()
#28 /vendor/yiisoft/yii2/web/Response.php(339): craft\web\Response->prepare()
#29 /vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#30 /web/index.php(12): yii\base\Application->run()
#31 {main}
Any updates on this?
This fix was already incorporated into dev-craft-4
if you were able to try it? Updated in 2.0.5
Question
I'm coming from Craft 3.8. When updating to Craft 4 and Workflow 2.0.4 i get the following error when finishing up the database. The project comes from an early Craft 3 version, maybe even Craft 2. I also tried uninstalling and then re-installing the plugin; with no success. Maybe someone has an input?
Additional context
No response