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

[4.x]: Active and Inactive Carts server error when sorting on billing first name #2956

Closed
philipboomy opened this issue Sep 1, 2022 · 2 comments
Assignees
Labels
bug commerce4 Issues related to Commerce v4

Comments

@philipboomy
Copy link

What happened?

Description

2022-09-01 18:37:27 [web.ERROR] [yii\db\Exception] SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "billing_address" LINE 8: ...."id" DESC, "commerce_orders"."dateUpdated" DESC, "billing_a...

Steps to reproduce

  1. Sort active carts by "Billing First Name" https://share.getcloudapp.com/v1uQAv5v
  2. See server error notification in lower left corner

Craft CMS version

4.2.3

Craft Commerce version

4.1.1

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@philipboomy philipboomy added commerce4 Issues related to Commerce v4 bug labels Sep 1, 2022
@philipboomy
Copy link
Author

philipboomy commented Sep 6, 2022

Stack trace:
#0 /Users/boomy/Sites/website/vendor/yiisoft/yii2/db/Command.php(1302): PDOStatement->execute()
#1 /Users/boomy/Sites/website/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT "element...')
#2 /Users/boomy/Sites/website/vendor/yiisoft/yii2/db/Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /Users/boomy/Sites/website/vendor/yiisoft/yii2/db/Query.php(249): yii\db\Command->queryAll()
#4 /Users/boomy/Sites/website/vendor/craftcms/cms/src/db/Query.php(247): yii\db\Query->all(Object(craft\db\Connection))
#5 /Users/boomy/Sites/website/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1471): craft\db\Query->all(Object(craft\db\Connection))
#6 /Users/boomy/Sites/website/vendor/craftcms/cms/src/base/Element.php(1060): craft\elements\db\ElementQuery->all(Object(craft\db\Connection))
#7 /Users/boomy/Sites/website/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(649): craft\base\Element::indexHtml(Object(craft\commerce\elements\db\OrderQuery), Array, Array, 'carts:inactive', 'index', true, true)
#8 /Users/boomy/Sites/website/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(146): craft\controllers\ElementIndexesController->elementResponseData(true, true)
#9 [internal function]: craft\controllers\ElementIndexesController->actionGetElements()
#10 /Users/boomy/Sites/website/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /Users/boomy/Sites/website/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#12 /Users/boomy/Sites/website/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('get-elements', Array)
#13 /Users/boomy/Sites/website/vendor/craftcms/cms/src/web/Application.php(301): yii\base\Module->runAction('element-indexes...', Array)
#14 /Users/boomy/Sites/website/vendor/craftcms/cms/src/web/Application.php(625): craft\web\Application->runAction('element-indexes...', Array)
#15 /Users/boomy/Sites/website/vendor/craftcms/cms/src/web/Application.php(280): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#16 /Users/boomy/Sites/website/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#17 /Users/boomy/Sites/website/web/index.php(22): yii\base\Application->run()
#18 /Users/boomy/.composer/vendor/laravel/valet/server.php(234): require('/Users/boomy/Site...')
#19 {main}

@philipboomy
Copy link
Author

Clearing my cookies in the browser fixes it for now but comes back I do filter again.

@nfourtythree nfourtythree self-assigned this Sep 6, 2022
lukeholder added a commit that referenced this issue Sep 7, 2022
…address-attributes

Fixed #2956 sorting orders by address attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

2 participants