core icon indicating copy to clipboard operation
core copied to clipboard

Vanity URL Forward to URL Map Pattern results in 404

Open x0rsw1tch opened this issue 7 years ago • 13 comments

Describe the bug

When creating a Vanity URL that is supposed to forward to a URL Mapped Content Type, results in a 404. No exceptions are being thrown. This problem is also reproducible on the demo site.

Note: This does work in dotCMS 4.

Steps to reproduce the behavior:

  1. Create a Vanity Url on the demo site with the following information:
  • Site: All Sites
  • Url: /testurl/([a-zA-Z0-9-_]+)
  • Action: 200 - Forward
  • Forward To: /products/$1
  • Save and Publish
  1. In private/incognito browser, navigate to: https://demo.dotcms.com/testurl/consumer-discretionary or a matching urlTitle of another contentlet from "Products".

Expected behavior

Browser is forwarded (transparently) to /products/consumer-discretionary with /testurl/consumer-discretionary in the address bar.

Actual behavior

dotCMS 5 Demo Site: Browser gets a 404 page.

dotCMS 4 Demo Site: Browser is forwarded as intended.

Screenshots

dotCMS 5 demo site: image

dotCMS 4 demo site: image

Desktop (please complete the following information):

  • OS: Windows 10 x64
  • Browser: Chrome
  • Version: 74.0.3729.169

x0rsw1tch avatar Jun 05 '19 21:06 x0rsw1tch

PR: https://github.com/dotCMS/core/pull/17769

freddyucv avatar Dec 30 '19 18:12 freddyucv

Hi @wezell,

We are having a similar issue for a large customer. This is impacting the platform and the end-users.

Could we please get a hotfix for this issue?

Thank you

yasindilekci avatar Jan 20 '20 08:01 yasindilekci

@yasindilekci - I would open a support ticket requesting a hotfix for the issue.

wezell avatar Jan 20 '20 14:01 wezell

PR: https://github.com/dotCMS/core/pull/17859

dsilvam avatar Jan 22 '20 17:01 dsilvam

@freddyucv @dsilvam this fix is still hitting elasticsearch every request:

ab -c 10 -n 10000 http://localhost:8080/about-us/index

Screen Shot 2020-01-22 at 8 02 58 PM

wezell avatar Jan 23 '20 01:01 wezell

@wezell Putting this comment on the proper ticket, following @freddyucv suggestion. New comment under https://github.com/dotCMS/core/issues/17612#issuecomment-577735179. Also putting the Needs Work to that issue instead.

dsilvam avatar Jan 23 '20 15:01 dsilvam

These changes are breaking the edit mode, we need some work here

bryanboza avatar Jan 30 '20 20:01 bryanboza

PR: https://github.com/dotCMS/core/pull/17926

freddyucv avatar Jan 30 '20 23:01 freddyucv

PR: https://github.com/dotCMS/core/pull/17933

freddyucv avatar Jan 31 '20 20:01 freddyucv

Note for QA: Algo go to the /services/first-time-investors page, and check that the left side menu is right (it should look exactly as it look in demo site )

freddyucv avatar Jan 31 '20 20:01 freddyucv

Passed Internal QA: Results: OK. The original issue has been solved and the one that broke Edit Mode too. This change had also broken the Nav Tool. Now, it works as expected

nollymar avatar Jan 31 '20 20:01 nollymar

Merged into 5.2.5 @bryanboza

dsilvam avatar Jan 31 '20 21:01 dsilvam

Fixed, tested on release-5.2.5 // Postgres // FF

bryanboza avatar Feb 07 '20 17:02 bryanboza