Sorting Challenges in the ESHOPMAN Admin UI: A Look at the Countries Table Error

Sorting Challenges in the ESHOPMAN Admin UI: A Look at the Countries Table Error

The ESHOPMAN Admin UI is the central control panel for managing headless commerce storefronts within HubSpot. It offers intuitive tools for product management and regional settings. Recently, a community member highlighted an important observation regarding data management, specifically a sorting issue in the Countries table for a given Region.

The Reported Issue: Sorting Disruption

A bug was identified in the ESHOPMAN Admin UI: attempting to sort the "Countries" table within a "Region" by 'Name' or 'Code' columns results in an error. Instead of the table reordering, an error message appears, requiring navigation back to recover. This issue, observed on a standard ESHOPMAN starter project, suggests a potentially widespread impact.

Technical Deep Dive: What the Error Messages Suggest

The error messages offer crucial clues. The primary error "occurred in the component," pinpointing the issue's origin in the Admin UI. A console log message, "The key ${key} is not a valid order key," strongly suggests a problem with how sorting parameters are constructed or interpreted. This points to an issue where the dynamic variable for the sorting key (e.g., 'name' or 'code') isn't correctly interpolated or validated against expected fields in the backend API or frontend component's data model.

An ESHOPMAN project's package.json, like the one below, showcases the core modules and dependencies powering such functionalities, built on Node.js/TypeScript:

{  "name": "@dtc/backend",  "version": "0.0.1",  "description": "An ESHOPMAN starter project backend.",  "author": "Move My Store (https://movemystore.com)",  "license": "MIT",  "keywords": [    "typescript",    "ecommerce",    "headless",    "eshopman"  ],  "dependencies": {    "@eshopman/admin-sdk": "2.17.2",    "@eshopman/admin-shared": "2.17.2",    "@eshopman/caching": "2.17.2",    "@eshopman/cli": "2.17.2",    "@eshopman/dashboard": "2.17.2",    "@eshopman/draft-order": "2.17.2",    "@eshopman/file-s3": "^2.17.2",    "@eshopman/framework": "2.17.2",    "@eshopman/js-sdk": "2.17.2",    "@eshopman/platform": "2.17.2",    "@eshopman/ui": "~4.1.15",    "@tanstack/react-query": "5.64.2",    "react-i18next": "13.5.0",    "react-router-dom": "~6.30.3",    "zod": "4.2.0"  },  "devDependencies": {    "@eshopman/test-utils": "2.17.2",    "@swc/core": "^1.7.28",    "@swc/jest": "^0.2.36",    "@types/jest": "^29.5.13",    "@types/node": "^20.12.11",    "@types/react": "^18.3.2",    "@types/react-dom": "^18.2.25",    "jest": "^29.7.0",    "prop-types": "^15.8.1",    "react": "^18.3.1",    "react-dom": "^18.3.1",    "ts-node": "^10.9.2",    "typescript": "^5.6.2",    "vite": "^5.4.14",    "yalc": "^1.0.0-pre.53"  },  "engines": {    "node": ">=20"  },  "packageManager": "pnpm@10.32.1"}

This setup highlights ESHOPMAN's foundation, with the issue likely stemming from the interaction between the frontend UI component () and the ESHOPMAN Admin API during sorted data requests.

Impact on ESHOPMAN Merchants and Developers

Though seemingly minor, this error can disrupt administrative workflows for merchants managing global operations or developers configuring regional settings. Easily sortable data in the Admin UI is crucial for efficient storefront management and a seamless customer experience via HubSpot CMS deployments.

Community Engagement and Next Steps

This report offers valuable community knowledge, highlighting an area for improvement in the ESHOPMAN Admin UI. It emphasizes robust error handling and consistent data interaction between the frontend and the ESHOPMAN Admin API. The ESHOPMAN team is triaging such reports, and community contributions are welcome. Users encountering similar issues should provide detailed reproduction steps for swift resolution.

At Move My Store, we prioritize a stable and intuitive ESHOPMAN experience, enabling seamless e-commerce operations powered by HubSpot. Stay tuned for updates.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools