verbb / workflow

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

Save draft and submit for review returns Internal Server Error #196

Open rossnorthrup opened 10 months ago

rossnorthrup commented 10 months ago

Describe the bug

Workflow version: 1.5.7

When I login in and open a page and all the most recent revision content is there, on the Current page, I do not have to go up and choose the latest revision to see the content.

I make an edit.

I choose, in the upper right hand corner: “Create a Draft”. It now says: “Draft 1”, in the top grey tab where it used to say “Current”.

When I try to choose: “Save draft and submit for review”, I get an Internal Server error.

Steps to reproduce

  1. Open an unpublished entry
  2. Save draft and submit for review

Craft CMS version

3.9.3

Plugin version

1.5.7

Multi-site?

no

Additional context

Editor User Permissions -

image

Workflow General Settings -

image

Workflow Notifications Settings -

image

PHP error - [error] TypeError: TypeError: craft\web\Controller::_enforceAllowAnonymous(): Argument #1 ($action) must be of type yii\base\Action, string given, called in /var/www/html/vendor/craftcms/cms/src/web/Controller.php on line 137 and defined in /var/www/html/vendor/craftcms/cms/src/web/Controller.php:142 Stack trace:

0 /var/www/html/vendor/craftcms/cms/src/web/Controller.php(137): craft\web\Controller->_enforceAllowAnonymous('save-submission')

1 /var/www/html/vendor/verbb/workflow/src/controllers/SubmissionsController.php(61): craft\web\Controller->beforeAction('save-submission')

2 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(176): verbb\workflow\controllers\SubmissionsController->beforeAction('save-submission')

3 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('save-draft', Array)

4 /var/www/html/vendor/craftcms/cms/src/web/Application.php(295): yii\base\Module->runAction('workflow/submis...', Array)

5 /var/www/html/vendor/craftcms/cms/src/web/Application.php(608): craft\web\Application->runAction('workflow/submis...', Array)

6 /var/www/html/vendor/craftcms/cms/src/web/Application.php(274): craft\web\Application->_processActionRequest(Object(craft\web\Request))

7 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))

8 /var/www/html/web/index.php(21): yii\base\Application->run()

9 {main}

engram-design commented 10 months ago

Workflow 1.5.7 is a bit out of date now (3 years old), can you try on the latest version?