Skip to content

Fix upgrading from 4.x with OrderCurrencyValuesAttributeConditionRule in place#3933

Merged
nfourtythree merged 4 commits intocraftcms:5.xfrom
boboldehampsink:fix-upgrading-from-4x-with-order-currency-values-attribute-condition-rule
May 6, 2025
Merged

Fix upgrading from 4.x with OrderCurrencyValuesAttributeConditionRule in place#3933
nfourtythree merged 4 commits intocraftcms:5.xfrom
boboldehampsink:fix-upgrading-from-4x-with-order-currency-values-attribute-condition-rule

Conversation

@boboldehampsink
Copy link
Contributor

Description

OrderCurrencyValuesAttributeConditionRule exists in 4.x but in 5.x relies on specific 5.x code. When this is in place, upgrading from 4.x to 5.x fails. This PR fixes that.

@boboldehampsink boboldehampsink requested a review from a team as a code owner March 12, 2025 12:24
@nfourtythree
Copy link
Contributor

Hi @boboldehampsink

Thank you for this, could you provide a stack trace of the error?

We are trying to hunt down the origin of what would cause this issue and require the suggested fix.

Thanks!

@nfourtythree nfourtythree self-assigned this Apr 14, 2025
@boboldehampsink
Copy link
Contributor Author

Don't have it anymore but I had an order field layout with an order conditional in 4.x and tried upgrading to 5.x

@boboldehampsink
Copy link
Contributor Author

@nfourtythree any news on this?

@nfourtythree
Copy link
Contributor

Hi @boboldehampsink

To double check we can do the correct testing. You have field on the order layout setup something like this?

CleanShot 2025-05-06 at 14 18 12@2x

Is that correct?

@boboldehampsink
Copy link
Contributor Author

I have two fields. On is called "original order" where you can select a different order. And one field is called "Order status", which has the conditional that "original order" "has value".

@nfourtythree
Copy link
Contributor

Thank you for the fix @boboldehampsink will merge this into 5.x now and will be in the next release of Commerce.

To get this early, change your craftcms/commerce requirement in your project's composer.json to:

"require": {
  "craftcms/commerce": "5.x-dev as 5.3.11",
  "...": "..."
}

Then run composer update.

Thanks!

@nfourtythree nfourtythree merged commit c0cc45e into craftcms:5.x May 6, 2025
@nfourtythree
Copy link
Contributor

Commerce 5.3.12 has been released with this fix included.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants