core icon indicating copy to clipboard operation
core copied to clipboard

Field Naming Issue

Open cfalzone opened this issue 14 years ago • 1 comments

With the right set of fields named a very specific way you can end up making it so Content Cannot Be added.

Basically you need the following fields:

  1. My Field - A Radio Field with at least 3 options
  2. My Field 2 - Any type field (I uses a select field)
  3. Category - A Category Field pointed to Any Category

What happens is My Field gets a variable name of myField, and My Field 2 gets a variable name of myField2. When we build out the options for myField the options are built with ids like myField0, myField1, myFiled2, ...

We end up with 2 objects on the page with id="myField2" and when it tries to build out the category field Dojo has issues and fails.

Here is a screencast of me showing how to reproduce the error: http://screencast.com/t/JiEp2pss

This affects both 2.0 and 1.9.5

cfalzone avatar May 03 '12 18:05 cfalzone

As JT pointed out to me. This is a very edge case, and it going to be more tricky to fix because we cannot just change the way we build out radio fields or it will break custom fields that are existing for clients.

Maybe for now we can just add some validation to adding a field that would alert the user to the issue and not let them save the field that way.

cfalzone avatar May 03 '12 18:05 cfalzone