Type: Regression Bug
Affects Version/s: 6.2.0 CE M5
Component/s: Web Content > Web Content Administration
Steps to reproduce:
- Login as an admin
- Go to Control Panel > Web Content
- Add a new structure "MyStructure". Add any field type.
- Select "Manage Templates" in the action button of "MyStructure".
- Add a new template "MyTemplate". Add any content for the script.
- Add a new web content "MyContent".
- Test 1: Try to remove "MyStructure". You won't be allowed and the following message is displayed: "Required structures could not be deleted. They are referenced by templates." (OK)
- Test 2: Remove "MyTemplate". The operation is completed succesfully. This leaves "MyContent" without a default template. (WRONG)
- Test 3: Now remove "MyStructure". The operation is completed succesfully. This leaves "MyContent" without a structure and any data added to a field of the structure will be lost without warning.(WRONG)
Even worse, in DB the article still references to the structureKey and templateKey of the removed structure and template, which might cause errors.