Skip to content

Shopify Dude Fix

Shopify Customer Account Extension Shows the Previous Page After Navigation? Fix currententrychange for 2027-01

Shopify 2027-01 changes currententrychange event.from to the previous page. Read navigation.currentEntry to render the destination route.

Quick answer: In customer account full-page UI extensions on API 2027-01, currententrychange now reports the previous entry in event.from. If your route state reads event.from.url to find the destination, it will render the page the buyer just left. Read shopify.navigation.currentEntry.url instead.
On this page

Why this breaks during an API upgrade

Shopify announced the correction on October 31, 2026. In API 2026-10 and earlier, event.from actually pointed to the new entry, despite its name. In 2027-01, it correctly points to the previous history entry. The change applies to full-page customer account targets customer-account.page.render and customer-account.order.page.render. An extension can therefore pass deployment and still display stale route content after navigation.

Change the source of truth

Search for currententrychange, event.from, and any state derived from the event’s URL. Read the current navigation entry for the destination and reserve event.from for cases that actually need the prior route.

// Old: accidentally works as destination on 2026-10
shopify.navigation.addEventListener('currententrychange', (event) => {
  setPath(new URL(event.from.url).pathname);
});

// New: works across the version boundary
shopify.navigation.addEventListener('currententrychange', () => {
  setPath(new URL(shopify.navigation.currentEntry.url).pathname);
});

Initialize your route from shopify.navigation.currentEntry too; a navigation event handler alone does not establish the initial page state. Shopify says this updated approach works on API 2025-10 and later, so you can ship it before upgrading the extension.

Don’t confuse a route event with a destination

The event signals that navigation changed. Its from field is not a stable cross-version alias for the new page. If you use the previous page for analytics or breadcrumbs, explicitly test that separate use case after upgrading.

Common misunderstanding: The event name is unchanged, so existing handlers must still be correct. The breaking change is in the meaning of event.from, not the event name or the extension target.

How to test this

  1. Open the extension on a development store with at least two routes and record the initial currentEntry.url.
  2. Navigate A → B and B → A; verify the displayed route always matches currentEntry.
  3. On API 2027-01, confirm event.from is the page you left, not the destination.
  4. Test direct links, browser back/forward, and an order page target where used.
  5. Repeat on the currently deployed API version before switching production traffic.