We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After a fresh Craft and Commerce 4 install without any other plugins, trying to save a Sale results in cannot assign null to property error
No exception and Sale is saved
Exception occurs and Sale is not saved
TypeError: Cannot assign null to property craft\commerce\models\Sale::$categoryRelationshipType of type string in /apps/commerce-craft/craft/vendor/craftcms/commerce/src/controllers/SalesController.php:145 Stack trace: #0 [internal function]: craft\commerce\controllers\SalesController->actionSave() #1 /apps/commerce-craft/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #2 /apps/commerce-craft/craft/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #3 /apps/commerce-craft/craft/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('save', Array) #4 /apps/commerce-craft/craft/vendor/craftcms/cms/src/web/Application.php(305): yii\base\Module->runAction('commerce/sales/...', Array) #5 /apps/commerce-craft/craft/vendor/craftcms/cms/src/web/Application.php(606): craft\web\Application->runAction('commerce/sales/...', Array) #6 /apps/commerce-craft/craft/vendor/craftcms/cms/src/web/Application.php(284): craft\web\Application->_processActionRequest(Object(craft\web\Request)) #7 /apps/commerce-craft/craft/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request)) #8 /apps/commerce-craft/craft/web/index.php(12): yii\base\Application->run() #9 {main}
4.6.0
4.3.3
8.1.27
Linux 4.4.0-210-generic
MySQL 5.7.33
GD 8.1.27
Commerce 4.3.3 and nothing else
The text was updated successfully, but these errors were encountered:
460675c
Fixed #3364 saving a sale error
01c5b4a
Thanks for reporting this. It also affects discounts, and we will fix them both shortly and let you know once the hotfix release is out.
Sorry, something went wrong.
This is fixed in Commerce 4.4.1.1
Thanks!
No branches or pull requests
What happened?
Description
After a fresh Craft and Commerce 4 install without any other plugins, trying to save a Sale results in cannot assign null to property error
Steps to reproduce
Expected behavior
No exception and Sale is saved
Actual behavior
Exception occurs and Sale is not saved
Craft CMS version
4.6.0
Craft Commerce version
4.3.3
PHP version
8.1.27
Operating system and version
Linux 4.4.0-210-generic
Database type and version
MySQL 5.7.33
Image driver and version
Installed plugins and versions
Commerce 4.3.3 and nothing else
The text was updated successfully, but these errors were encountered: