Skip to content

Commit

Permalink
Fixed errors not showing on order edit after saving
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Dec 6, 2024
1 parent 8b0cc54 commit 12e7920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft Commerce

## Unreleased

- Fixed a bug where order errors weren't showing on the Edit Order page.

## 4.7.1 - 2024-12-02

- Fixed an error that occurred on the Orders index page when running Craft CMS 4.13.4 or later. ([#3793](https://github.com/craftcms/commerce/issues/3793))
Expand Down
1 change: 1 addition & 0 deletions src/controllers/OrdersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,7 @@ private function _registerJavascript(array $variables): void

if ($variables['order']->hasErrors()) {
$response['order']['errors'] = $variables['order']->getErrors();
$response['errors'] = $variables['order']->getErrors();
$response['error'] = Craft::t('commerce', 'The order is not valid.');
}

Expand Down

0 comments on commit 12e7920

Please sign in to comment.