Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Request – yii\web\BadRequestHttpException when attempting to delete a client from CP #21

Open
jamesmacwhite opened this issue Dec 23, 2024 · 1 comment

Comments

@jamesmacwhite
Copy link
Contributor

Describe the bug

image

When attempting to delete a client from the client page CP page (specifically the delete button), the following error is thrown:

yii\web\BadRequestHttpException: Request must accept JSON in response in /var/www/html/vendor/craftcms/cms/src/web/Controller.php:559
Stack trace:
#0 /var/www/html/vendor/verbb/consume/src/controllers/ClientsController.php(86): craft\web\Controller->requireAcceptsJson()
#1 [internal function]: verbb\consume\controllers\ClientsController->actionDelete()
#2 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#3 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()
#4 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#5 /var/www/html/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->runAction()
#6 /var/www/html/vendor/craftcms/cms/src/web/Application.php(649): craft\web\Application->runAction()
#7 /var/www/html/vendor/craftcms/cms/src/web/Application.php(312): craft\web\Application->_processActionRequest()
#8 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#9 /var/www/html/web/index.php(12): yii\base\Application->run()
#10 {main}

Steps to reproduce

  1. Create a client and save it
  2. On the save button, click the arrow to reveal the delete option
  3. Confirm the delete alert message
  4. A 400 error is thrown due to requiring the accept header from the controller

Craft CMS version

5.5.7

Plugin version

2.0.1

Multi-site?

No

Additional context

No response

@engram-design
Copy link
Member

Fixed for the next release. To get this early, run composer require verbb/consume:"dev-craft-5 as 2.0.1".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants