dotCMS / core

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

UVE: Editor doesn't support chained Vanity URLs that are redirects #29165

Closed zJaaal closed 2 weeks ago

zJaaal commented 2 months ago

Parent Issue

TBD

Problem Statement

If we create a Vanity URL that is a redirect (Permanent or Temporary) that points to another Vanity URL (Permanent or Temporary) it will never get to the final page inside of the UVE.

Steps to Reproduce

All vanity URLs should be permanent or temporary redirects.

https://github.com/dotCMS/core/assets/63567962/ad8e88bf-1af5-4bfd-81cd-976966e2fdf5

Acceptance Criteria

We should be able to handle N redirects using the Vanity URL since is a possible behavior.

dotCMS Version

trunk-latest

Proposed Objective

Technical User Experience

Proposed Priority

Priority 2 - Important

Assumptions & Initiation Needs

Quality Assurance Notes & Workarounds

No workarounds at the moment.

zJaaal commented 1 month ago

We have to test this again, could possibly be fixed in this card https://github.com/dotCMS/core/issues/28947

valentinogiardino commented 1 month ago

Passed Internal QA

Video

https://github.com/user-attachments/assets/f9fa4bcb-aabc-4bb7-82cf-52f2f172b77a

bryanboza commented 4 weeks ago

This is working now, however I'm getting a NPE in the log every time that I call the chain of vanities, https://gist.github.com/bryanboza/7d7729859e44f2e745fe39f225ff4a6d

We need to tale look of this error and make sure will not affect any other feature when I'm navigating into the final page.

valentinogiardino commented 3 weeks ago

This is working now, however I'm getting a NPE in the log every time that I call the chain of vanities, https://gist.github.com/bryanboza/7d7729859e44f2e745fe39f225ff4a6d

We need to tale look of this error and make sure will not affect any other feature when I'm navigating into the final page.

The exception is not related to UVE or vanity URLs. The NPE was reproducible with the 20240807 starter, which lacks vanity URLs pointing to the pages where the exception occurs. Specifically, the problem arises in the ShortyServlet when it tries to retrieve the inodePath of an image. It fails because some images in the starter have a null liveInode, while the method assumes the presence of a live version, leading to the failure.

Steps to Reproduce the current NPE

  1. Start a new dotCMS instance using the 20240807 starter.
  2. Open an incognito tab.
  3. Navigate to / or /index.
  4. Inspect the dotCMS logs to observe the null pointer exception.
nollymar commented 2 weeks ago

As the exception is related to data, we are catching the NPE and throwing and logging a dotCMS checked exception

rjvelazco commented 2 weeks ago

Passed Internal QA

Video

https://github.com/user-attachments/assets/9673e2a9-3da9-46f1-9abe-6982fa229b89

bryanboza commented 2 weeks ago

We need to take look the following case here:

nollymar commented 2 weeks ago

@bryanboza please share more details to reproduce this error. Are you using full starter data? what page are you using? did you create a new one?

bryanboza commented 1 week ago

Sorry guys, it seems the error is related to the page I selected for the example, so it's not associated with the vanity chain. We can pass on this one for now, and I'll create a new card for it since it's out of the scope of this card.