Closed mjniland1 closed 5 months ago
Thanks for reporting this.
For the initial error, we have this issue you can follow here: https://github.com/craftcms/commerce/issues/3479
For the subsequent query error, we have fixed this for the next release.
To get the fix early, change your craftcms/commerce
requirement in composer.json to:
"require": {
"craftcms/commerce": "5.x-dev#3780e2a81515926b8e6b1417ad79ae331668bee1 as 5.0.3",
"...": "..."
}
Then run composer update
.
We will update this github issue once the release is out.
Appreciate the quick response.
The query error has been fixed on my end but the issue referenced in #3479 still persists after upgrading to 5.x-dev#3780e2a81515926b8e6b1417ad79ae331668bee1
.
Log after running composer install
on the new build:
The project config is a fresh rebuild from the database.
Upgrading to 5.x-dev#323ac6403f8a91812af074811fab37fb5e021e93 as 5.0.3
in #3488 fixed the original issue for me but later in the process the config apply failed due to: error: Calling unknown method: craft\models\Site::getStore()
.
@mjniland1 Can you submit a new issue and include steps to reproduce, and email your pre-upgrade DB, original commerce 4 project config folder, composer.json, composer.lock to support@craftcms.com and reference the github issue you created. Thanks.
What happened?
Description
Applying the project configuration from Commerce 5.0.3 to a new project resulted in a failure with the error message: "error: Attempt to read property 'storeId' on null". While trying to troubleshoot this issue, I attempted to accessed the store settings on my original project at (admin/commerce/settings/stores/1) and encountered another error
Database Exception – yii\db\Exception SQLSTATE[42S22]: Column not found: 1054 Unknown column 'commerce_orders.id' in 'on clause' The SQL being executed was: SELECT EXISTS(SELECT * FROM
c_commerce_orders
LEFT JOINc_elements
el
ONel
.id
=commerce_orders
.id
WHERE (storeId
=1) AND (el
.dateDeleted
IS NULL)) Error Info: Array ( [0] => 42S22 [1] => 1054 [2] => Unknown column 'commerce_orders.id' in 'on clause'Steps to reproduce
Craft CMS version
Craft Pro 5.1.1
Craft Commerce version
5.0.3
PHP version
8.2.18
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
-