verbb / workflow

A Craft CMS plugin to create a workflow for publishing entries.
Other
140 stars 27 forks source link

Front End Submission Error #208

Closed RitterKnightCreative closed 2 months ago

RitterKnightCreative commented 4 months ago

Describe the bug

Using the docs as a guide, I just tried submitting a front end submission with Workflow 2.0.9, w/ latest version of Craft 4 (4.9.1).

From the CP, everything works great. However, I can't get a front end submission to work.

If I try to submit a new entry, I get an "Invalid numeric value"... it's like it's trying to combine an element ID with the potential new slug?

Stack trace:
#0 /var/www/html/vendor/craftcms/cms/src/helpers/Db.php(850): craft\helpers\Db::parseParam('elements.id', Array, '=', false, 'integer')
#1 /var/www/html/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1460): craft\helpers\Db::parseNumericParam('elements.id', '14263-submissio...')
#2 /var/www/html/vendor/yiisoft/yii2/db/QueryBuilder.php(227): craft\elements\db\ElementQuery->prepare(Object(craft\db\mysql\QueryBuilder))
#3 /var/www/html/vendor/yiisoft/yii2/db/Query.php(157): yii\db\QueryBuilder->build(Object(craft\elements\db\EntryQuery))
#4 /var/www/html/vendor/yiisoft/yii2/db/Query.php(287): yii\db\Query->createCommand(Object(craft\db\Connection))
#5 /var/www/html/vendor/craftcms/cms/src/db/Query.php(275): yii\db\Query->one(NULL)
#6 /var/www/html/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1703): craft\db\Query->one(NULL)
#7 /var/www/html/vendor/verbb/workflow/src/controllers/ElementsController.php(139): craft\elements\db\ElementQuery->one()
#8 /var/www/html/vendor/verbb/workflow/src/controllers/ElementsController.php(33): verbb\workflow\controllers\ElementsController->_getEntryFromResponse(Object(craft\web\Response), 1)
#9 [internal function]: verbb\workflow\controllers\ElementsController->actionSaveEntry()
#10 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#12 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('save-entry', Array)
#13 /var/www/html/vendor/craftcms/cms/src/web/Application.php(340): yii\base\Module->runAction('workflow/elemen...', Array)
#14 /var/www/html/vendor/craftcms/cms/src/web/Application.php(641): craft\web\Application->runAction('workflow/elemen...', Array)
#15 /var/www/html/vendor/craftcms/cms/src/web/Application.php(302): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#16 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#17 /var/www/html/web/index.php(12): yii\base\Application->run()
#18 {main}

Steps to reproduce

  1. Setup a new form per the docs
  2. Submit

Craft CMS version

4.9.1

Plugin version

2.0.9

Multi-site?

NO

Additional context

No response

engram-design commented 4 months ago

Fixed for the next release. To get this early, run composer require verbb/workflow:"dev-craft-4 as 2.0.9".

engram-design commented 2 months ago

Fixed in 2.0.10