U4-7588 - Conflicting compositions should not be allowed

Created by Morten Bock 21 Dec 2015, 09:58:27 Updated by Claus Jensen 13 Jan 2016, 11:14:44

Create two doctypes Foo and Bar, both with a property called "title". No create a doctype MyPage, and add Foo and Bar as compostitions. When saving the MyPage doctype, a generic "look in the logs" error message is displayed. This is because of conflicting properties on the composition types.

I think that should be a nicer validation message saying "The property 'title' exists on multiple composition types." and probably a suggestion on how to fix this.

Comments

Shannon Deminick 11 Jan 2016, 15:08:36

For testing:

Test 1

  • Create 3 content types: ct1, ct2, ct3 all of which contain a Property Type with an alias: "title"
  • Once created/saved - click on each one and verify when you view the compositions list dialog: ** You do not see the current content type in the list ** You are not allowed to select the other content types created - or any other content type that has a property type with an alias of "title"

Test 2

  • Create 2 content types: ct1, ct2 all of which contain a Property Type with an alias: "title"
  • Once created/saved - start creating a new content type: ct3
  • Once created/saved - verify when you view the compositions list dialog: ** You are not allowed to select the other content types created - or any other content type that has a property type with an alias of "title"

Test 3

  • Create 2 content types: ct1, ct2 all of which contain a Property Type with an alias: "title"
  • Once created/saved - start creating a new content type: ct3
  • Add a property type with the alias "title"
  • verify when you view the compositions list dialog: ** You are not allowed to select the other content types created - or any other content type that has a property type with an alias of "title"

Test 4

  • Create 3 content types: ct1, ct2, ct3 all of which contain a Property Type with an alias: "title"
  • Once created/saved - start creating a new content type: ct4 (no property types)
  • in the compositions dialog: ** select ct1, verify that ct2 and ct3 - or any other content type that has a property type with an alias of "title" is not selectable ** uncheck ct1, verify that ct2 and ct3 are now selectable ** Test this scenario by checking ct2 and ct3


Shannon Deminick 11 Jan 2016, 15:11:47

PR for review: https://github.com/umbraco/Umbraco-CMS/pull/1009


Claus Jensen 12 Jan 2016, 13:16:30

Test 1: When initially opening the compositions dialog, ct1 and ct2 seems available. Upon clicking either one of them the webservice is called and the filtering method is run and they now show as disabled. The filtering method is not run initally.

Test 2: Both ct1 and ct2 are available when opening the dialog, but when I have selected ct1 and deselect it again - I am no longer able to select ct2 even though it should be available when ct1 has been deselected again.

Test 3: Same as in test 1 and test 2. Initially I don't see the actual state until I try selecting a composition. And after having items disabled in the dialog, going back - removing the title property and then reopening the compositions dialog, they are still disabled.

Test 4: Same as test 2 .. unselecting ct1 wont make the others available.


Sebastiaan Janssen 12 Jan 2016, 15:08:00

So @Claus.Jensen what's the conclusion? do you want to put it in reopened?


Shannon Deminick 12 Jan 2016, 15:53:38

More testing notes:

claus [4:34 PM] having created ct1 and ct2 .. going to ct2 and adding comp gives me ct1-avail, and ct2-disabled. Saving with ct1 selected and then going back - i dont see ct2 in there anymore

‚Äč[4:34] its not a problem as such since it would be disabled anyway - but its a bit inconsistent

claus [4:41 PM] and - after adding in a composition and saving, I am no longer able to deselect it from the compositions... that one is a bit worse..


Claus Jensen 13 Jan 2016, 11:01:41

Have pulled this PR in so we can get on with merging other issues in. Most of above has been fixed/tested - one remaining issue will be fixed outside this PR:

  • create ct1 + ct2
  • add one property on ct1
  • go to ct2 and assign ct1
  • without clicking save, you cannot deselect ct1 from composition


Claus Jensen 13 Jan 2016, 11:14:44

Have created a new issue for next sprint on the remaining task here: http://issues.umbraco.org/issue/U4-7707


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.4.0

Due in version: 7.4.0

Sprint: Sprint 6

Story Points:

Cycle: