Changes you made may not be saved
-
Hi
I’m having a minor but pretty frustrating issue with the checkout in my WooCommerce store. When the customer submits the checkout form the user get a alert modal saying “Changes you made may not be saved” before placing the order and redirecting to the order placed page.
What do I need to do to prevent the alert from showing up when submitting an order.
I checked what invokes the alert and I think that it’s the
attachUnloadEventsOnSubmit()
method in checkout.min.js?ver=6.7.0. But I’m not to sure.The only plugin installed is WooCommerce and I’m running WordPress 6.0.1. The theme is completely custom.
I’m looking forward to any help since this will be the last issue before I can go live with my first store.
-
Hi there,
Thanks for reaching out.
I need to learn a bit more about your site setup to assist you here. It will be great if you could share your current System Status Report. You can get it by navigating to the
WooCommerce / Status
section of your site. Once there, click on theGet system report
button and then copy it by clicking on theCopy for support
button. Then paste it here in a comment.Best,
Thank you @daniyalahmedk. Below the system report.
### WordPress Environment ### WordPress address (URL): https://shop.geerts.dev Site address (URL): https://shop.geerts.dev WC Version: 6.7.0 REST API Version: ? 6.7.0 WC Blocks Version: ? 7.8.3 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.0.1 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: ? Language: nl_NL External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.30 PHP Post Max Size: 256 MB PHP Time Limit: 120 PHP Max Input Vars: 3000 cURL Version: 7.66.0 OpenSSL/1.1.1q-fips SUHOSIN Installed: – MySQL Version: 5.7.38-41-log Max Upload Size: 256 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 6.6.1 WC Database Prefix: krs_ Totale database grootte: 4.83MB Database gegevens grootte: 3.28MB Database index grootte: 1.55MB krs_woocommerce_sessions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB krs_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB krs_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB krs_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB krs_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB krs_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_actionscheduler_actions: Data: 0.05MB + Index: 0.11MB + Engine InnoDB krs_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB krs_ewwwio_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_ewwwio_queue: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_mollie_pending_payment: Data: 0.02MB + Index: 0.00MB + Engine InnoDB krs_options: Data: 2.03MB + Index: 0.06MB + Engine InnoDB krs_postmeta: Data: 0.08MB + Index: 0.06MB + Engine InnoDB krs_posts: Data: 0.06MB + Index: 0.06MB + Engine InnoDB krs_sgs_log_events: Data: 0.08MB + Index: 0.00MB + Engine InnoDB krs_sgs_log_visitors: Data: 0.02MB + Index: 0.00MB + Engine InnoDB krs_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB krs_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB krs_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB krs_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB krs_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB krs_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB krs_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB krs_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB krs_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB krs_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB ### Post Type Counts ### attachment: 5 nav_menu_item: 15 page: 8 post: 2 product: 4 product_variation: 3 revision: 4 shop_order: 14 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (6) ### Classic Editor: door WordPress Contributors – 1.6.2 Loco Translate: door Tim Whitlock – 2.6.2 Mollie-betalingen voor WooCommerce: door Mollie – 7.2.0 SiteGround Optimizer: door SiteGround – 7.2.0 SiteGround Security: door SiteGround – 1.3.0 WooCommerce: door Automattic – 6.7.0 ### Inactive Plugins (0) ### ### Settings ### API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ? ### WC Pages ### Winkelbasis: #7 - /shop/ Winkelwagen: #8 - /cart/ Afrekenen: #9 - /checkout/ Mijn account: #10 - /my-account/ Algemene voorwaarden: ? Pagina niet ingesteld ### Theme ### Name: Broezert theme Version: 0.1 Author URL: https://geerts.dev/ Child Theme: ? – Als je wijzigingen aanbrengt in WooCommerce of in een hoofdthema dat je niet zelf gebouwd hebt raden we het gebruik van een sub-thema aan. Zie: Hoe maak je een sub-thema WooCommerce Support: ? ### Templates ### Overrides: broezert/woocommerce/archive-product.php versie - is verouderd. De hoofdversie is 3.4.0 broezert/woocommerce/cart/cart-empty.php versie - is verouderd. De hoofdversie is 3.5.0 broezert/woocommerce/cart/cart.php versie - is verouderd. De hoofdversie is 3.8.0 broezert/woocommerce/checkout/form-checkout.php versie - is verouderd. De hoofdversie is 3.5.0 broezert/woocommerce/checkout/thankyou.php versie - is verouderd. De hoofdversie is 3.7.0 broezert/woocommerce/single-product.php versie - is verouderd. De hoofdversie is 1.6.4 Outdated Templates: ? Leer hoe te updaten ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices wc-pay-promotion wc-pay-welcome-page wc-pay-subscriptions-page Disabled Features: minified-js settings Daily Cron: ? Next scheduled: 2022-07-15 18:47:58 +02:00 Options: ? Notes: 51 Onboarding: completed ### Action Scheduler ### Afgerond: 82 Oldest: 2022-06-28 21:58:15 +0200 Newest: 2022-07-15 17:52:52 +0200 In afwachting: 1 Oldest: 2022-07-15 20:10:34 +0200 Newest: 2022-07-15 20:10:34 +0200 ### Status report information ### Generated at: 2022-07-15 17:53:19 +02:00
Hi @dontwerpt,
Thanks for the system status report.
It’s probably related to your custom theme as I can see there are template overrides for the checkout.
broezert/woocommerce/checkout/form-checkout.php versie - is verouderd. De hoofdversie is 3.5.0 broezert/woocommerce/checkout/thankyou.php versie - is verouderd. De hoofdversie is 3.7.0
Can you try after switching the theme to Storefront and leaving only WooCommerce core active?
I’d also suggest running a database update to match the WC core version you have installed (6.7.0).
WC Database Version: 6.6.1
You can do that from WooCommerce > Status > Tools > Update database after saving a backup.
Let us know how it goes.
Thank you @rainfallnixfig. I have updated the db version. The issue disappears once I remove the custom
form-checkout.php
. The issue is in my custom theme.I’m now looking for an solution on how to prevent the alert from showing up in my custom theme before submitting the order. I can’t find what’s triggering the alert.
Hello,
Glad to hear you figured out what is the cause of the issue, we are unable to provide support for third-party themes, my recommendation is to reach out to the theme support developers they will be able to point you in the right direction.
Thank you.
Well, I’ve figured it out. I got the alert as described when I submitted the form from inside a JavaScript function instead of clicking the form submit button. I’m not sure what’s the difference between those but I’m happy that I finally found a solution.
To clarify: instead of
form.submit()
I now dosubmitButton.click()
from inside my custom form submit function (after checking if the form is valid). The submit button is stil present in the form but it’s hidden.
- The topic ‘Changes you made may not be saved’ is closed to new replies.