ESHOPMAN Admin Dashboard: Unpacking the 'Silent Save' Bug in Region Configuration

At Move My Store, we understand that a seamless experience within your e-commerce platform is paramount. ESHOPMAN, our headless commerce solution integrated with HubSpot, provides powerful tools for managing your storefronts, products, and operational regions directly from the HubSpot environment. Recently, our vibrant ESHOPMAN community brought to light an important detail regarding region configuration that warrants a closer look.

The issue, identified by a community member, highlighted a specific challenge when creating new operational regions within the ESHOPMAN Admin Dashboard. When attempting to define a new region—for example, for the Caribbean and Antilles—users meticulously filled in all visible required fields. However, upon clicking 'Save', the form would seemingly do nothing. There was no visual feedback, no toast notification, and no inline error message to indicate why the operation failed. This 'silent save' behavior led to confusion and a frustrating user experience.

The Technical Deep Dive: Uncovering the Root Cause

Further investigation, by checking the browser's developer console, revealed the underlying problem: a missing Payment Provider. While this field is crucial for a functional region, its absence was not communicated effectively to the user. The console displayed an Uncaught (in promise) ZodError, pointing to a validation failure within the application's frontend logic.

Uncaught (in promise) ZodError
    at chunk-UEC35S4B.js?v=91804e29:94:82
    at Object.resolver (chunk-UEC35S4B.js?v=91804e29:101:8)
    at _executeSchema (chunk-B24BWTZQ.js?v=91804e29:1153:51)
    at chunk-B24BWTZQ.js?v=91804e29:1522:40
    at handleSubmit (chunk-LFLN6I6Y.js?v=91804e29:17:33)
    at HTMLUnknownElement.callCallback2 (chunk-U3XUIKGL.js?v=91804e29:3674:22)
    at Object.invokeGuardedCallbackDev (chunk-U3XUIKGL.js?v=91804e29:3699:24)
    at invokeGuardedCallback (chunk-U3XUIKGL.js?v=91804e29:3733:39)
    at invokeGuardedCallbackAndCatchFirstError (chunk-U3XUIKGL.js?v=91804e29:3736:33)
    at executeDispatch (chunk-U3XUIKGL.js?v=91804e29:7014:11)

Community experts quickly pinpointed the technical specifics. The ESHOPMAN Admin Dashboard, built with Node.js/TypeScript, utilizes a validation schema (likely Zod) that explicitly requires at least one payment provider for a region (payment_providers: zod.array(zod.string()).min(1)). However, the form's resolver was throwing an uncaught ZodError instead of correctly setting field-level errors. Furthermore, the Form.ErrorMessage component intended for the payment_providers field was present but remained unpopulated. Crucially, the form.handleSubmit function lacked an onInvalid callback, which would typically trigger a fallback toast notification when validation fails.

Actionable Insights for ESHOPMAN Developers and Merchants

This discussion provides valuable lessons for anyone working with or extending the ESHOPMAN platform:

  • Robust Form Validation: For developers building custom forms or extending existing ones within the ESHOPMAN Admin Dashboard, ensure your validation resolvers (e.g., Zod resolvers) are correctly configured to return field-level errors. This allows the UI to display specific messages next to the problematic fields.
  • Comprehensive Error Handling: Always implement an onInvalid callback within your form.handleSubmit functions. This serves as a critical fallback, providing a general toast notification to the user when any form validation fails, preventing silent failures.
  • User Experience First: Clear and immediate feedback is essential. Users should always know if their input is valid or why an action failed. This reduces frustration and improves efficiency for merchants managing their ESHOPMAN storefronts via HubSpot.

The ESHOPMAN team is actively addressing this to ensure that all required fields in the Admin Dashboard provide explicit and immediate feedback, aligning with our commitment to a seamless and intuitive user experience. This collaborative effort from the ESHOPMAN community underscores the strength of our ecosystem in continually refining the platform for all users.

Start with the tools

Explore migration tools

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

Explore migration tools