← All tests

Discount Ledger Order Link No Longer 404s STAGING

Narong: clicking an order number on the Discounts page went to a "page not found".

On the Discounts & Promotions page, clicking an order number sent you to a broken page. The link had the app's /cafe prefix written into it by hand, and the framework adds that prefix automatically — so it ended up doubled (/cafe/cafe/orders…) and the page couldn't be found. Fixed.

The discounts ledger with a linked order number
The Discounts ledger — each order number is a link.
Clicking the order number now lands on Order Management
Clicking it now lands on Order Management for that day, instead of a 404.

Why by date, not the specific order

The link opens Order Management filtered to that order's day — that's intentional. Order Management is organised by business date and doesn't have a single-order page to jump to, so the date is the right place to land. Only the broken address was wrong, not the destination.

Checks

SuiteResult
Local, incl. a control run against the broken link4/4
Staging, against the deployed build4/4
Staging smoke regression5/5

The checks read the link's real address and confirm it isn't doubled, then follow it and confirm it doesn't 404 — the exact failure that was reported. Run against the previous version, the control reproduces the broken /cafe/cafe/orders address.

One-line fix. No database change. Verified on staging.