U4-4747 - Document Type Property name aliases PascalCase instead of camelCase

Created by firepol 23 Apr 2014, 07:05:23 Updated by Stephan 23 Apr 2014, 17:35:09

Relates to: U4-3027

Relates to: U4-4168

After upgrading a 6.1.6 website to 6.2-RC I noticed the following.

When editing a document type or creating a new one, when I enter as '''property name''' "My Test Property", the '''auto-generated alias''' is now "MyTestProperty".

This is wrong, in previous umbraco versions the first letter of the alias was always lower case.

This behavior generates '''inconsistency in naming conventions''' with previous versions and as 6.2 final is not out yet I highly recommend to fix this and keep the old way... unless of course Umbraco 7 is like this and you want 6.2 and 7 to have similar behaviours...

Comments

Stephan 23 Apr 2014, 10:45:26

Reproduced, and 6 and 7 are not consistent. In 7 you cannot force it to use "myTestProperty" anymore, which is a bug.


Stephan 23 Apr 2014, 10:54:23

An in addition if you edit an existing property and enter an invalid alias eg "my test property" in the alias box and save without leaving the box, so no front-end ajax cleanup of the alias takes place, that invalid alias ends up being actually used for the property. Which is a bug.


firepol 23 Apr 2014, 11:27:53

Another little addition. If the user browser is set to save Form fields: when creating many document types with same properties (e.g. Heading Text, Body Text etc.) you can click the input box and select from the previous entered data (as said: browser feature). When doing so, however, the alias remains empty and is not auto-generated like when you manually type the property name. I think this is so because the event bound to the input box is listening for keystrokes. Would be a nice to have to fix this, so that the alias would be auto-generated also in this situation.


Stephan 23 Apr 2014, 17:32:06

Pushed 0810e90 to 7.1.2 and 6d50b46 to 6.2.0 (different fixes required for the different versions) that should

  • make sure that if you manage to get the UI to send an invalid alias to the server, it is made safe again by the server
  • properly auto-generate an alias when a name is selected via autocomplete
  • stop auto-generating an alias as soon as you have left the name box, and even if you come back to the box
  • properly report invalid aliases (red border) on 7

The last point was annoying: you'd enter a name, then tab to the alias to fix the alias, and if by accident you moved back to the name, your alias would change. Now it is preserved.


Stephan 23 Apr 2014, 17:33:14

As for the rest of the issue, namely the fact that new document type properties are aliases with PascalCase instead of camelCase, this is to some extend a duplicate of U4-3027. Will handle it there, closing this issue.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Stephan

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 6.2.0, 7.1.2

Sprint:

Story Points:

Cycle: