guest-entries icon indicating copy to clipboard operation
guest-entries copied to clipboard

Error submitting entries over HTTP after upgrading to Craft 3.3.14

Open tegandbiscuits opened this issue 5 years ago • 2 comments

Hi, sorry if this isn't the right place to create this issue.

After upgrading from Craft from 3.3.7 to 3.3.14, this plugin stopped behaving as expected when saving an entry over ajax (with CSRF protection disabled).

At the new version, I get a 400 response with this body:

{
    "error": "Unable to verify your data submission."
}

In case it helps, this is in the logs and seems relevant:

2019-11-05 10:44:32 [-][-][-][error][yii\web\HttpException:400] yii\web\BadRequestHttpException: Unable to verify your data submission. in /app/vendor/yiisoft/yii2/web/Controller.php:166
Stack trace:
#0 /app/vendor/craftcms/cms/src/web/Controller.php(143): yii\web\Controller->beforeAction(Object(yii\base\InlineAction))
#1 /app/vendor/craftcms/cms/src/controllers/TemplatesController.php(72): craft\web\Controller->beforeAction(Object(yii\base\InlineAction))
#2 /app/vendor/yiisoft/yii2/base/Controller.php(155): craft\controllers\TemplatesController->beforeAction(Object(yii\base\InlineAction))
#3 /app/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('render', Array)
#4 /app/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render', Array)
#5 /app/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('templates/rende...', Array)
#6 /app/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)
#7 /app/vendor/craftcms/cms/src/web/Application.php(284): yii\web\Application->handleRequest(Object(craft\web\Request))
#8 /app/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#9 /app/web/index.php(21): yii\base\Application->run()
#10 {main}

I'm able to downgrade Craft back to 3.3.7 to keep things from breaking, but that's obviously not going to be a long term solution.

tegandbiscuits avatar Nov 05 '19 18:11 tegandbiscuits

Can you try updating to the latest versions of Guest Entries and Craft? If you’re still getting an error, please clear out your storage/logs/ folder, recreate the error, and then search through storage/logs/web.log for [error] and post the new error message and stack trace. (The one you posted looks unrelated to Guest Entries.)

brandonkelly avatar Apr 07 '20 18:04 brandonkelly

Sorry, I missed this reply until today.

I'm still getting the error with craftcms/cms at 3.4.27, and craftcms/guest-entries at 2.3.0.

After removing the logs and trying again, this is the only thing with error.

2020-07-10 15:35:03 [-][-][-][error][yii\web\HttpException:400] yii\web\BadRequestHttpException: Unable to verify your data submission. in /app/vendor/yiisoft/yii2/web/Controller.php:190
Stack trace:
#0 /app/vendor/craftcms/cms/src/web/Controller.php(134): yii\web\Controller->beforeAction(Object(yii\base\InlineAction))
#1 /app/vendor/craftcms/cms/src/controllers/TemplatesController.php(69): craft\web\Controller->beforeAction(Object(yii\base\InlineAction))
#2 /app/vendor/yiisoft/yii2/base/Controller.php(155): craft\controllers\TemplatesController->beforeAction(Object(yii\base\InlineAction))
#3 /app/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('render', Array)
#4 /app/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render', Array)
#5 /app/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('templates/rende...', Array)
#6 /app/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)
#7 /app/vendor/craftcms/cms/src/web/Application.php(276): yii\web\Application->handleRequest(Object(craft\web\Request))
#8 /app/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#9 /app/web/index.php(21): yii\base\Application->run()
#10 {main}

tegandbiscuits avatar Jul 10 '20 22:07 tegandbiscuits