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]: Shipping zone can't have the same name as a tax zone #3317

Closed
TomFaust opened this issue Oct 25, 2023 · 3 comments
Closed

[4.x]: Shipping zone can't have the same name as a tax zone #3317

TomFaust opened this issue Oct 25, 2023 · 3 comments
Assignees
Labels
bug commerce4 Issues related to Commerce v4

Comments

@TomFaust
Copy link

What happened?

Description

While trying to save a shipping zone I received the error message saying the name 'Canada' was already in use, however I had no other shipping zones setup. Looking in the database I saw no records in the shipping zones tables either, nor anything named 'Canada' in the shipping methods or shipping category sections. Eventually I noticed that i had a tax zone named 'Canada', and when changing this to 'Canadab' I was able to save my shipping zone. However, going back to the tax zone I was still able to save it as 'Canada' no problem.

Steps to reproduce

  1. Create a tax zone called 'Canada'
  2. Attempt to create a shipping zone called 'Canada'

Expected behavior

Save the shipping zone

Actual behavior

Unable to save, seemingly because there is a tax zone present with the same name

Craft CMS version

4.5.3

Craft Commerce version

4.2.11

PHP version

8.1

Operating system and version

macOS 13.3 (22E252)

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@TomFaust TomFaust added commerce4 Issues related to Commerce v4 bug labels Oct 25, 2023
@TomFaust TomFaust changed the title [4.x]: Shipping zone can't have the name of a tax zone [4.x]: Shipping zone can't have the same name as a tax zone Oct 25, 2023
@lukeholder lukeholder self-assigned this Oct 25, 2023
@lukeholder
Copy link
Member

Thanks for reporting this! I have fixed it for the next release.

To get the fix early, change your craftcms/commerce requirement in composer.json to:

"require": {
  "craftcms/commerce": "dev-develop#6e79084b5ca6adc660f2a6d53d2a76947316b4ce as 4.3.1",
  "...": "..."
}

Then run composer update.

I will also update this issue once the release is out.

@lukeholder
Copy link
Member

(Fixed in 6e79084)

@lukeholder
Copy link
Member

This is now fixed in 4.3.2

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