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.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff-6-8.txt | 810 bytes | legolasbo |
| #8 | 2990186-8.patch | 2.04 KB | legolasbo |
| #6 | 2990186-6-test-only.patch | 1.25 KB | legolasbo |
| #2 | 2990186-1.patch | 810 bytes | birk |
Comments
Comment #2
birk commentedIt's because the
exists()function inEckEntityBundleFormchecks for the name in all eck entity types.Comment #3
legolasboComment #4
rshafakian commentedInstalled 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
Comment #5
legolasboThe patch looks good, but I'm missing test coverage for this functionality.
Comment #6
legolasboThis patch adds a test that proves the issue exists.
Comment #8
legolasboThe test failed as expected. This patch adds the code from #2.
Comment #10
legolasboThe patch fixes the failing test so I've committed it. Thank you for your contributions @birk and @rshafakian!