U4-4842 - Unable to edit "name" and "alias" to MediaType property

Created by Flavio Spezi 07 May 2014, 17:48:46 Updated by Laurence Gillian 20 May 2014, 10:47:12

Is duplicated by: U4-4951

I can't edit "name" and "alias" fields of MediaType property.

To reproduce:

  • create new MediaType
  • add a new Tab
  • add a property in the newest Tab
  • try to change "name" or "alias" value.

The UI works properly when the property is in "Generic Properties" Tag.

Comments

Stephan 14 May 2014, 13:47:45

Reproduced on MediaType & ContentType.


Stephan 15 May 2014, 09:29:30

I thought I had repro it on 6 but I'm not able to do it anymore. On 7 it always repros. One thing is, if you leave the page unattended for a few minutes then edit & save the property, it works. Edit & save again, it fails. Wait for a few minutes, it works. Etc.

Which means that the editing part is working, and the repository part is working, but something's wrong in between. Discussed it with Shannon, might be a cache / deep clone issue. Assigning to Shannon.


Flavio Spezi 15 May 2014, 14:03:47

I'm trying to wait but I have the same issue.

I'm using DistributedCall, but after I disabled the feature and restart app, I have the same issue.


Shannon Deminick 15 May 2014, 23:01:32

For some odd reason in ContentTypeRepository during a save, it turns out there is 2 entries in the entity.PropertyTypes collection that are the same - the old one and the new one. The new one get's saved, and then the old one gets saved thus overwriting the new one.

Not sure how this has slipped by without unit tests.

Will fix asap


Shannon Deminick 16 May 2014, 00:06:50

Ok, have figured out what is going on and it's rather strange:

  • On a content type we have two collection properties: PropertyTypeCollection and PropertyGroupCollection
  • The PropertyTypeCollection instance on a ContentType is for property types without a group
  • Each PropertyGroup in PropertyGroupCollection contains it's own instance of PropertyTypeCollection for property types that exist on a group

Now, the problem is that the property type is added to both collections (the one attached to the content type and the one attached to the property group), it should only exist in one of those collections. So now need to figure out why it is being added to both.


Shannon Deminick 16 May 2014, 01:31:25

Got it, was a cloning issue. The issue was solved for content types but not media types. Have implemented a better fix across the board with tests.


Priority: Major

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category: UI

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.2.0, 7.1.2

Due in version: 7.1.3, 6.2.1

Sprint:

Story Points:

Cycle: