Affects Version/s: 6.0.12 EE, 6.1.0 CE GA1, 6.1.10 EE GA1, 6.2.0 CE M2
Component/s: Web Content > Web Content Administration
Steps to reproduce:
- Go to control panel, web content section. Select "structures" tab.
- Create a new structure.
- Press "add row" buttion, then add a field "age" of type "selection list"
- Press the + button at the right of the field to add a new option for the selector.
- Type ">10 & <20" in the first field, type "teenager" in the second field.
- Save the structure
- Try to edit the structure again
- Structure edition page is partially loaded. The "XML Schema Definition" section is never loaded
- Following error appears:
- Structure should be editable normally
Structures created before
LPS-15761 may not be editable after that commit.
The root cause is that a specific validation was done on the 'name', then switched to validate the 'type' of each list item. Values for 'type' entered before the commit (correctly validated) may contain characters that caused new validation check to fail. The 'type' is called 'value' in the drag'n'drop structure editor available from the web content edition page.
Changing the 'type' is not an acceptable solution: if you edit the structure and change the 'type' for allowing structure to be saved, web content created before this change will hold an unexisting value so the web content editor will lose the 'name' displayed in the combo-box.
In addition, both before and after that commit, some characters pass the current validation and make the SAXReader to fail when parsing the structure.
To fix this issue:
- Current validation should be removed
- XML entities (characters such as '&' and '>') should be encoded by the front-end and saved in a escaped form.