CurrentEntryChange Now Returns the Previous Page – What Developers Need to Know

Starting with API version 2027-01, the Navigation API’s currententrychange event now reports the page a customer left instead of the page they navigated to. Learn how this breaking change impacts full‑page account extensions and how to update your code before the upgrade.

CurrentEntryChange Now Returns the Previous Page – What Developers Need to Know
6 sections

Shopify’s Navigation API just got a subtle but crucial tweak. In API version 2027-01 the currententrychange event’s event.from property now points to the page the customer just left, not the page they’re navigating to. If your customer‑account full‑page extensions rely on event.from to detect the new route, they’ll start showing stale content the moment you upgrade. This post breaks down the change, explains who it touches, and gives you a step‑by‑step migration path so you can keep your extensions running smoothly.

What Changed

Prior to API version 2026-10, the currententrychange event passed a NavigationCurrentEntryChangeEvent where event.from contained the *new* entry – effectively mirroring shopify.navigation.currentEntry. Starting in 2027-01, Shopify aligned the property with its documentation: event.from now holds the *previous* history entry. In other words, after a navigation the event tells you where the user came from, not where they are headed.

Who Is Affected

Only full‑page extensions that run in the customer‑account UI (e.g., customer‑account.page.render or customer‑account.order.page.render) and that read event.from to determine the destination page are impacted. Extensions still on API 2026-10 or earlier see no change. Code that already uses shopify.navigation.currentEntry or the useNavigationCurrentEntry hook remains safe across all versions.

Breaking Changes & Migration Steps

If your handler extracts the URL from event.from.url, it will now receive the previous URL, causing the UI to lag one navigation behind. The fix is straightforward: stop reading the new URL from the event and pull it directly from shopify.navigation.currentEntry instead. This approach works in API 2025-10 and later, so you can implement the change today and then upgrade your API version with confidence.

Before:

shopify.navigation.addEventListener('currententrychange', (event) => {

setPath(new URL(event.from.url).pathname);

});

After:

shopify.navigation.addEventListener('currententrychange', () => {

setPath(new URL(shopify.navigation.currentEntry.url).pathname);

});

Action Required

  • Search your codebase for any currententrychange listeners that reference event.from.url or event.from.*.
  • Replace those references with shopify.navigation.currentEntry as shown in the code snippet above.
  • Run your lint/CI checks to ensure the new import path is available (the Navigation API is part of the standard UI extensions SDK).
  • Update your extension’s apiVersion field to 2027-01 *only after* you’ve applied the code changes.
  • Deploy to a staging store and verify that navigating between routes updates the UI instantly, without showing the previous page.
  • Testing Your Update

    Open a customer account page that contains your full‑page extension. Use the browser’s dev tools to monitor the console for the currententrychange event. After each navigation, confirm that shopify.navigation.currentEntry.url matches the URL you just visited. If the path updates correctly, your migration is successful. Also, run your automated UI tests to catch any regression before pushing to production.

    Conclusion

    The 2027-01 Navigation API tweak is a classic example of a small‑scale breaking change that can ripple through customer‑facing extensions. By swapping event.from for shopify.navigation.currentEntry today, you avoid unexpected UI glitches and keep your extensions future‑proof. Need a hand reviewing your code or testing the migration? Reach out in the Shopify Community forums or drop a comment below—happy coding!

    Tags
    Sources

    Related Articles

    UI Extensions Can Now Host Unlimited Locale Files—No More 256 KB Ceiling

    UI Extensions Can Now Host Unlimited Locale Files—No More 256 KB Ceiling

    Shopify has removed the 256 KB combined size limit for UI extension locale files, letting developers add more languages without trimming translations. Learn what changed, who it affects, and how to expand your extensions instantly.

    October 30, 20264 min
    Trusted Vault Origin Signal Empowers Credit Card Payments in Shopify Payments Apps

    Trusted Vault Origin Signal Empowers Credit Card Payments in Shopify Payments Apps

    Shopify’s new trusted_vault_origin flag gives payment app developers a reliable way to handle missing CVV for vaulted cards. Learn what changed, who’s affected, and how to update your integration today.

    October 30, 20265 min
    Gift Card line_item_id Becomes Read‑Only in API 2027‑01 – What Developers Need to Know

    Gift Card line_item_id Becomes Read‑Only in API 2027‑01 – What Developers Need to Know

    Shopify’s REST Admin API 2027‑01 makes the Gift Card line_item_id field read‑only. Learn who is impacted, why it matters, and the exact steps to update your app before the upgrade.

    October 30, 20263 min
    Variants Managed Directly on the Product Page: What Shopify Merchants Need to Know

    Variants Managed Directly on the Product Page: What Shopify Merchants Need to Know

    Shopify’s latest update moves variant management onto the product page, letting merchants edit, search, filter, and bulk‑edit variants without switching screens. Learn who’s affected, how to enable it, and what developers should consider.

    October 29, 20265 min