dotCMS / core

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

UVE: Changes made in recent starter is breaking the examples #28986

Closed zJaaal closed 2 days ago

zJaaal commented 4 days ago

Parent Issue

TBD

Problem Statement

We are having errors when setting up the UVE with recent starters.

Some errors that I found while trying to run UVE using demo site.

Screenshots

Screenshot 2024-06-24 at 1 26 16 PM

You can see in the image above, that we are trying to render images from urls like: https://demo.dotcms.comcd6ddfb96c7dec2eb00c99c9d50a7e3f?language_id=1

There's a missing / and if we fix that in the code we can see that all the images are broken:

https://github.com/dotCMS/core/assets/63567962/5ee8996e-ce1b-4298-9941-1ad93f28e55b

In the case of https://demo.dotcms.comcd6ddfb96c7dec2eb00c99c9d50a7e3f?language_id=1

The correct way to see this image is by adding /dA/ to the url like this: https://demo.dotcms.com/dA/cd6ddfb96c7dec2eb00c99c9d50a7e3f?language_id=1

We can also find this kind of errors with the most recent starter. We can get to broken links like: https://demo.dotcms.comundefinedf?language_id=1

This problems are cause by a change in the latest starter that involved the replacement of the Binary Field in all images for a Image Field.

Both fields have a different way to handle the images and we developed our examples to work with the Binary Field that's why when we try to run the examples with an starter that has this changes. All images are broken or the example does not run at all.

Since the starter changed. We should adapt the components to work with the latest changes in the starter.

Steps to Reproduce

Try to run any headless example using an environment that have the latest starter.

Acceptance Criteria

Headless examples should be updated to work with the fields that changed in the most recent starter

dotCMS Version

latest-trunk

Proposed Objective

Technical User Experience

Proposed Priority

Priority 1 - Show Stopper

Assumptions & Initiation Needs

Quality Assurance Notes & Workarounds

No workarounds.

zJaaal commented 3 days ago

Note to QA

The way to test this is to change the starter in your local environment, the ones that I used to test this while developing the fix are these (you can use anyone you want, but we are focused on the latests ones):

Broken images or misplaced data are related to the content inside the starter and not the examples, it's expected that content breaks if you change the starter due to changes in the content itself.

We are expecting that the examples do not crash when using different starters.

valentinogiardino commented 2 days ago

Passed Internal QA

Docker image: [dotcms/dotcms:trunk]

Screen recordings

https://github.com/dotCMS/core/assets/77643678/448427e3-f667-41ea-9a5c-76ab8326a4b6

https://github.com/dotCMS/core/assets/77643678/97d6c2ed-27fc-41ad-bd5c-a6871df9a6e6

https://github.com/dotCMS/core/assets/77643678/c61a9583-a3b9-49b4-9023-0b905d2a630f