dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
865 stars 467 forks source link

UVE: Contentlets created on variants are not saving correctly #28799

Open zJaaal opened 5 months ago

zJaaal commented 5 months ago

Parent Issue

TBD

Problem Statement

After creating a contentlet inside a variant we have different issues with the contentlet:

Image not showing on HTML but is showing on Content Palette:

Screenshot 2024-06-07 at 11 12 42 AM

Unable to open Edit Contentlet:

https://github.com/dotCMS/core/assets/144152756/342976f5-ca96-48c8-a2a6-d09f74256e72

We can open the edit content in the old edit mode, but the image is not saved:

https://github.com/dotCMS/core/assets/63567962/aa6a38f0-733b-417d-b0b8-55a2afcbe73c

Steps to Reproduce

  1. Configure and run the Analytics app
  2. Enable the UVE for your environment
  3. Create an experiment for any page
  4. Create a variant
  5. Go to that variant
  6. Create a contentlet and use it
  7. Click to edit the recently created contentlet
  8. See the error

Acceptance Criteria

We should be able to create, edit and reuse a contentlet inside a variant

dotCMS Version

trunk-latest

Proposed Objective

Technical User Experience

Proposed Priority

Priority 2 - Important

Assumptions & Initiation Needs

  1. You understand how to use the UVE
  2. You understand how experiments work

Quality Assurance Notes & Workarounds

No workarounds at the moment.

fmontes commented 5 months ago

@freddyDOTCMS will be checking the backend.

freddyDOTCMS commented 5 months ago

I am almost sure this is a Backend issue, also it is part of the Experiment changes so I am going to take to Falcon Team

jcastro-dotcms commented 1 month ago

As per conversation with @john-thomas-dotcms and @freddyDOTCMS on August 28th, 2024, this issue is not caused by Java/back-end code, but the Angular layer.

Slack thread: https://dotcms.slack.com/archives/CQMHM7PNJ/p1724882036153449

john-thomas-dotcms commented 1 week ago

@freddyDOTCMS can you please put details in this card about your investigation, and let us know if you think this should be handled by the UVE team or not?

freddyDOTCMS commented 1 week ago

We are not cleaning up the current Variant when get out of an Experiment, in the image you can see the the Session Storage has the as current Variant the Experiment's Variant, even when I am on the Browser Portlet

image (6)

For example I go inside a Variant, the go out and create a Page, the age was created but inside the Experiment's Variant

it can be the root of all the problems that we have with Variant

john-thomas-dotcms commented 1 week ago

@fmontes please see Freddy R's comment above.

Summary: The variant id is not being cleaned up when you got to edit a variant, and then stop editing the variant (going back to the experiments config).

We haven't touched this code in quite a while, so we think that probably happened during some UVE changes. And we'd like to make sure the UVE devs know how to handle experiments and variants since you're in this code quite a bit. So, can your team take on the fix?

fmontes commented 1 week ago

@john-thomas-dotcms make sense, I'll take this back to Scout for further investigation and fix.

zJaaal commented 6 days ago

I found out something related to the session storage not being updated. I'll be working on this and will notify the details of the fix that I will implement.

Thanks for the insights @john-thomas-dotcms @freddyDOTCMS @jcastro-dotcms

github-actions[bot] commented 6 days ago

PRs: