The error message The machine-readable name is already in use. It must be unique. is displayed, when trying to create a bundle with an existing name in a different eck entity type.

Comments

Birk created an issue. See original summary.

birk’s picture

StatusFileSize
new810 bytes

It's because the exists() function in EckEntityBundleForm checks for the name in all eck entity types.

legolasbo’s picture

Status: Active » Needs review
rshafakian’s picture

Status: Needs review » Reviewed & tested by the community

Installed ECK on a clean install of drupal. Created 2 entity types and tried to create a bundle in each entity type with the same name. This resulted in the error explained in this issue. I then applied the patch and went through the entire same process again, but this time with success. Marking as RTBC

legolasbo’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

The patch looks good, but I'm missing test coverage for this functionality.

legolasbo’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new1.25 KB

This patch adds a test that proves the issue exists.

Status: Needs review » Needs work

The last submitted patch, 6: 2990186-6-test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

legolasbo’s picture

Status: Needs work » Needs review
StatusFileSize
new2.04 KB
new810 bytes

The test failed as expected. This patch adds the code from #2.

  • legolasbo committed 7dca191 on 8.x-1.x authored by Birk
    Issue #2990186 by legolasbo, Birk, rshafakian: Same bundle name in two...
legolasbo’s picture

Status: Needs review » Fixed

The patch fixes the failing test so I've committed it. Thank you for your contributions @birk and @rshafakian!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.