craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
227 stars 170 forks source link

[5.x]: Issues loading element index (products) when variant stock is added to the view table #3800

Open klick opened 8 hours ago

klick commented 8 hours ago

What happened?

Description

Loading element indexes errors out after loading for a few minutes when Stock is added to the view table. No report in storage/logs but the debug bar reveals a stack trace to the error.

Full Stack trace:

yii\web\BadRequestHttpException: Request must accept JSON in response in /home/httpd/vhosts/***/vendor/craftcms/cms/src/web/Controller.php:559
Stack trace:
#0 /home/httpd/vhosts/***/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(108): craft\web\Controller->requireAcceptsJson()
#1 /home/httpd/vhosts/***/vendor/yiisoft/yii2/base/Controller.php(176): craft\controllers\ElementIndexesController->beforeAction(Object(yii\base\InlineAction))
#2 /home/httpd/vhosts/***/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('get-elements', Array)
#3 /home/httpd/vhosts/***/vendor/craftcms/cms/src/web/Application.php(350): yii\base\Module->runAction('element-indexes...', Array)
#4 /home/httpd/vhosts/***/vendor/craftcms/cms/src/web/Application.php(649): craft\web\Application->runAction('element-indexes...', Array)
#5 /home/httpd/vhosts/***/vendor/craftcms/cms/src/web/Application.php(312): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#6 /home/httpd/vhosts/***/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#7 /home/httpd/vhosts/***/web/index.php(12): yii\base\Application->run()
#8 {main}

Steps to reproduce

  1. Clicking on Commerce > Products (View table has stock added)
  2. Ajax takes forever (loader spinning), bringing the whole system to a halt
  3. Errors out, nothing in the logs.

Expected behavior

List element indexes (products).

Actual behavior

Craft CMS version

5.5.5

Craft Commerce version

5.2.7

PHP version

8.2.25

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

linear[bot] commented 8 hours ago

PT-2334 [5.x]: Issues loading element index (products) when variant stock is added to the view table