[DEFECT] Style Editor Page data loss and Style Property corruption in UVE
Problem Statement
The new "Style Editor" feature within the "Universal Visual Editor (UVE)" is currently experiencing two critical issues that lead to data loss and corruption of contentlets. These issues significantly impede the usability and reliability of the Style Editor feature.
- Deletion of Other Contentlets: When a user edits the specific "styleProperties" of a contentlet using the Style Editor, all other contentlets present on the page are unexpectedly deleted.
- Loss of Existing Style Properties: If one or more contentlets already have "styleProperties" applied, and a user subsequently adds a new contentlet to the page, the initial contentlet(s) that had style properties applied will lose them.
These issues are classified as blockers, as they result in unacceptable data loss and render the Style Editor feature unusable. This impacts all users who attempt to utilize the Style Editor to customize contentlet attributes. Resolution is required urgently to prevent further data integrity issues and enable the rollout of this feature.
Browser & OS: Not specified in the original description, likely a core functional issue independent of specific browser/OS combinations.
Steps to Reproduce
Scenario 1: Other contentlets are deleted from the page when editing style properties
- Open the Universal Visual Editor (UVE).
- Add at least two different contentlets to the page (e.g., 'Contentlet A' and 'Contentlet B').
- Select 'Contentlet A' and open its 'Style Editor'.
- Change the value of any 'styleProperty' for 'Contentlet A' using the form displayed in the Style Editor.
- Save or apply the changes made in the Style Editor.
- Observe: 'Contentlet B' (and any other contentlets besides 'Contentlet A') are deleted from the page.
Scenario 2: Existing style properties are lost when adding a new contentlet
- Open the Universal Visual Editor (UVE).
- Add a contentlet (e.g., 'Contentlet C') to the page.
- Select 'Contentlet C' and open its 'Style Editor'.
- Apply one or more 'styleProperties' to 'Contentlet C' and save/apply the changes. Visually confirm 'Contentlet C' displays its new styles.
- Add a new contentlet (e.g., 'Contentlet D') to the same page.
- Observe: 'Contentlet C' loses its previously applied 'styleProperties'.
Acceptance Criteria
To resolve this issue, the following objective criteria must be met:
- No Contentlet Deletion: When a user modifies the 'styleProperties' of a specific contentlet via the Style Editor, no other contentlets on the page must be deleted or affected in any unintended way.
- Style Properties Persistence: When a new contentlet is added to a page, any existing contentlets that have 'styleProperties' applied must retain those properties without loss or corruption.
- No Regression: The implemented fixes must be thoroughly tested to ensure they do not introduce regressions or negatively impact other core functionalities within UVE (e.g., adding, editing, deleting, or moving contentlets).
dotCMS Version
98de141
Severity
Critical - System unusable
QA Notes:
To test this out from the visual editor headless/traditional we need to add some FE code in order to see the backend changes otherwise we will keep loosing content and styles, those FE changes will be added in Create a REST API Endpoint(s) for Style Properties Management.
but everything is working in the BE, to test this out you could use the collection Define_Contentlets_StyleProperties.postman_collection.json added for the postman testing. make sure you:
- Have an environment set with:
serverURL = localhost:9090
user = [email protected]
password = admin
See more details and recommendations here: https://drive.google.com/file/d/1OX1f8nYIvOrYu-LFfmDeigdqhQ6hAwyo/view?usp=sharing
Passed QA
- dotCMS docker image: [
dotcms/dotcms:trunk]
Video
https://github.com/user-attachments/assets/0477da6f-774b-4b6f-932f-d480154c6358