Support » Plugin: WooCommerce » Confirm form resubmission WordPress single Product Page

  • Resolved GylanSalih

    (@dschilani)


    Hello i hope you are fine?
    I have a problem 🙂 :

    I’m on the shop page

    I open a product, I choose the size and color👉 The product is added to the cart.
    My cart Shows 1 product.

    So far so good … I am refreshing the page and receive a message :
    https://ibb.co/gwDVY7L here is a link of the image

    I click on Continue and then I have 2 products .

    I would like to remove this message and that he will add a product if the page is refreshed briefly.

    I ask for help I need help PLS!
    An answer to solve this problem…
    It takes me Strength and nerves
    Here my site health information:

    i refresh the add to product action, not only refreshing the content. It doubles

    ### wp-core ###
    
    version: 5.7.1
    site_language: en_GB
    user_language: en_US
    timezone: Europe/Berlin
    permalink: /%postname%/
    https_status: true
    multisite: false
    user_registration: 1
    blog_public: 1
    default_comment_status: open
    environment_type: production
    user_count: 9
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /home/www/wordpressDschilani.COM
    wordpress_size: 2.33 GB (2507123507 bytes)
    uploads_path: /home/www/wordpressDschilani.COM/wp-content/uploads
    uploads_size: 372.16 MB (390234367 bytes)
    themes_path: /home/www/wordpressDschilani.COM/wp-content/themes
    themes_size: 19.76 MB (20722374 bytes)
    plugins_path: /home/www/wordpressDschilani.COM/wp-content/plugins
    plugins_size: 265.29 MB (278172445 bytes)
    database_size: 179.20 MB (187908096 bytes)
    total_size: 3.15 GB (3384160789 bytes)
    
    ### wp-dropins (1) ###
    
    advanced-cache.php: true
    
    ### wp-active-theme ###
    
    name: Astra Child Theme (astra-child)
    version: 1.0.0
    author: Brainstorm Force
    author_website: http://wpastra.com/about/
    parent_theme: Astra (astra)
    theme_features: core-block-patterns, astra_hooks, align-wide, automatic-feed-links, title-tag, post-thumbnails, html5, post-formats, custom-logo, customize-selective-refresh-widgets, editor-style, woocommerce, amp, menus, infinite-scroll, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, widgets
    theme_path: /home/www/wordpressDschilani.COM/wp-content/themes/astra-child
    auto_update: Disabled
    
    ### wp-parent-theme ###
    
    name: Astra (astra)
    version: 3.3.3
    author: Brainstorm Force
    author_website: https://wpastra.com/about/
    theme_path: /home/www/wordpressDschilani.COM/wp-content/themes/astra
    auto_update: Disabled
    
    ### wp-plugins-active (27) ###
    
    All-in-One WP Migration: version: 7.41, author: ServMask, Auto-updates disabled
    All in One SEO: version: 4.1.0.1, author: All in One SEO Team, Auto-updates disabled
    Classic Editor: version: 1.6, author: WordPress Contributors, Auto-updates disabled
    Complianz | GDPR/CCPA Cookie Consent: version: 5.0.0, author: Really Simple Plugins, Auto-updates disabled
    Disable XML-RPC Pingback: version: 1.2.1, author: Samuel Aguilera, Auto-updates disabled
    Elementor: version: 3.2.1, author: Elementor.com, Auto-updates disabled
    Elementor Pro: version: 3.2.1, author: Elementor.com, Auto-updates disabled
    Essential Addons for Elementor: version: 4.6.2, author: WPDeveloper, Auto-updates disabled
    Facebook for WooCommerce: version: 2.4.0, author: Facebook, Auto-updates disabled
    Google Analytics for WordPress by MonsterInsights: version: 7.17.0, author: MonsterInsights, Auto-updates enabled
    Jetpack by WordPress.com: version: 9.6.1, author: Automattic, Auto-updates disabled
    JetProductGallery For Elementor: version: 1.2.3, author: Crocoblock, Auto-updates disabled
    Max Mega Menu: version: 2.9.3, author: megamenu.com, Auto-updates disabled
    Nav Menu Roles: version: 2.0.1, author: Kathy Darling, Auto-updates disabled
    Really Simple SSL: version: 4.0.14, author: Really Simple Plugins, Auto-updates disabled
    Redirection: version: 5.1.1, author: John Godley, Auto-updates disabled
    Slider Revolution: version: 6.4.6, author: ThemePunch (latest version: 6.4.8), Auto-updates disabled
    Slider Revolution Slicey Add-On: version: 2.1.0, author: ThemePunch, Auto-updates disabled
    Super Product Variation Swatches: version: 1.9, author: Joe Iz, Auto-updates disabled
    Username Changer: version: 3.2.2, author: Widgit Team, Auto-updates disabled
    WooCommerce: version: 5.2.2, author: Automattic, Auto-updates disabled
    WooCommerce PDF Invoices & Packing Slips: version: 2.8.3, author: Ewout Fernhout, Auto-updates disabled
    Wordfence Security: version: 7.5.2, author: Wordfence, Auto-updates disabled
    WP Dashboard Notes: version: 1.0.10, author: Jeroen Sormani, Auto-updates disabled
    WP Mail SMTP Pro: version: 2.7.0, author: WPForms, Auto-updates disabled
    WPS Hide Login: version: 1.8.5, author: WPServeur, NicolasKulka, wpformation, Auto-updates disabled
    YITH WooCommerce Wishlist: version: 3.0.21, author: YITH, Auto-updates disabled
    
    ### wp-plugins-inactive (10) ###
    
    CartFlows: version: 1.6.12, author: CartFlows Inc, Auto-updates disabled
    Checkout Field Editor for WooCommerce: version: 1.4.8, author: ThemeHigh, Auto-updates disabled
    MonsterInsights Pro: version: 7.15.1, author: MonsterInsights, Auto-updates disabled
    Multi-Step Checkout for WooCommerce: version: 2.15, author: SilkyPress, Auto-updates disabled
    PHP Compatibility Checker: version: 1.5.0, author: WP Engine, Auto-updates disabled
    Smush Pro: version: 3.8.2, author: WPMU DEV, Auto-updates disabled
    WooLentor - WooCommerce Elementor Addons + Builder: version: 1.8.7, author: HasThemes (latest version: 1.8.8), Auto-updates disabled
    WooLentor Pro: version: 1.5.8, author: HasThemes (latest version: 1.6.5), Auto-updates disabled
    WP Fastest Cache: version: 0.9.1.7, author: Emre Vona, Auto-updates disabled
    WP File Manager: version: 7.1.1, author: mndpsingh287, Auto-updates disabled
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1687
    imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
    file_uploads: File uploads is turned off
    post_max_size: 150M
    upload_max_filesize: 150M
    max_effective_size: 150 MB
    max_file_uploads: 20
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 252 GB
    	imagick::RESOURCETYPE_DISK: 1.844674407371E+19
    	imagick::RESOURCETYPE_FILE: 768
    	imagick::RESOURCETYPE_MAP: 252 GB
    	imagick::RESOURCETYPE_MEMORY: 126 GB
    	imagick::RESOURCETYPE_THREAD: 1
    gd_version: 2.2.5
    ghostscript_version: 9.26
    
    ### wp-server ###
    
    server_architecture: Linux 4.9.0-15-amd64 x86_64
    httpd_software: Apache
    php_version: 8.0.3 64bit
    php_sapi: apache2handler
    max_input_variables: 10000
    time_limit: 150
    memory_limit: 1024M
    max_input_time: -1
    upload_max_filesize: 150M
    php_post_max_size: 150M
    curl_version: 7.52.1 OpenSSL/1.0.2u
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: true
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 8.0.19
    client_version: mysqlnd 8.0.3
    
    ### wp-constants ###
    
    WP_HOME: https://www.dschilani.com
    WP_SITEURL: https://www.dschilani.com
    WP_CONTENT_DIR: /home/www/wordpressDschilani.COM/wp-content
    WP_PLUGIN_DIR: /home/www/wordpressDschilani.COM/wp-content/plugins
    WP_MEMORY_LIMIT: 40M
    WP_MAX_MEMORY_LIMIT: 1024M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_LOCAL_DEV: undefined
    DB_CHARSET: utf8mb4
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable
    
    ### aioseo (1) ###
    
    noindexed: Author Archives, Date Archives, Categories (category)
    
    ### jetpack ###
    
    site_id: 185517753
    ssl_cert: No
    time_diff: false
    version_option: 9.6.1:1618680017
    old_version: 9.5:1616545685
    public: Public
    master_user: No master user set.
    current_user: #1 Dschilani
    tokens_set: None
    blog_token: Not set.
    user_token: Not set.
    version: 9.6.1
    jp_plugin_dir: /home/www/wordpressDschilani.COM/wp-content/plugins/jetpack/
    plan: free
    protect_header: {"trusted_header":"REMOTE_ADDR","segments":1,"reverse":false}
    full_sync: {"started":"Thu, 01 Jan 1970 00:00:00 +0000","finished":"Thu, 01 Jan 1970 00:00:00 +0000","progress":[],"config":[]}
    sync_size: 83
    sync_lag: 2 days, 6 hours, 17 minutes, 10 seconds
    full_sync_size: undefined
    full_sync_lag: 0 seconds
    idc_urls: {"home":"https:\/\/www.dschilani.com","siteurl":"https:\/\/www.dschilani.com","WP_HOME":"https:\/\/www.dschilani.com","WP_SITEURL":"https:\/\/www.dschilani.com"}
    idc_error_option: false
    idc_optin: true
    cxn_tests: {"8":{"name":"test__connection_token_health","label":false,"short_description":"Blog token validation failed.","long_description":"<p>A healthy connection ensures Jetpack essential services are provided to your WordPress site, such as Stats and Site Security.<\/p><p><span class=\"dashicons fail\"><span class=\"screen-reader-text\">Error<\/span><\/span> Blog token validation failed.<\/p><p><strong>We recommend reconnecting Jetpack.<\/strong><\/p>","severity":"critical","action":"https:\/\/www.dschilani.com\/wp-admin\/admin.php?page=jetpack#\/reconnect","action_label":"Reconnect Jetpack now","show_in_site_health":true,"pass":false,"group":["default"],"type":"direct"}}
    
    ### wp_mail_smtp ###
    
    version: 2.7.0
    license_key_type: lite
    debug: Mailer: SMTP.com
    api_key - invalid
    db_tables: gowp_wpmailsmtp_tasks_meta
    pro_install_date: Mar 28, 2021 @ 3:20pm
    
    
    • This topic was modified 1 year, 5 months ago by GylanSalih.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter GylanSalih

    (@dschilani)

    “When you add a product to cart and then refresh the page – the form is re-submitted and the product is re-added to cart.

    Extensive custom coding would be necessary in order to change this behavior.

    If the product wasn’t added to cart in the first place and the page is refreshed – one more item won’t be added to cart.”

    Saw the answer from somebody but is it possible without coding ? Any plugins or redricts ? Or maybe a short code ?
    Can someone say which code and where ??
    Please..

    Plugin Support Gabriel F. a11n

    (@gabrielfuentes)

    Hi there 👋

    This kind of problem is usually caused by a conflict with your theme or with another plugin.
     
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Before you start

    1. First, please make sure you have a good backup in place of your full site and database. Most hosting companies have this included in the subscription, but you could also consider using a service like Jetpack. If something goes wrong, it’s nice to know that you can restore your site.
    2. Second, I would suggest installing a plugin called Health Check & Troubleshooting. This is a plugin developed by the WordPress community and it allows you to disable plugins without affecting your current site visitors.

    Cheers!

    Thread Starter GylanSalih

    (@dschilani)

    Sadly not working sir.
    Trying all but still not disabled.

    Any other tip for me ? Or maybe custom code that I can put in my wordpress or data bank / files

    Thanks a lot for your answer maybe other solution.
    Cheers !

    Plugin Support Gabriel F. a11n

    (@gabrielfuentes)

    That’s strange! Let’s check if there is an error on the WooCommerce Logs. So please, provide us the following:

    • Error log: share a copy of the fatal error log found under WooCommerce > System Status > Logs (if available)

    Cheers!

    Thread Starter GylanSalih

    (@dschilani)

    2021-03-27T20:51:41+00:00 CRITICAL Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php:549
    Stack trace:
    #0 /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php(549): array_search('visitors', NULL, true)
    #1 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(292): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->format_data_value(Array, 'jetpack/stats/v...', 'jetpack/stats', 'visitors', Array)
    #2 /home/www/wordpressDschilani.COM/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
    #3 /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php(446): apply_filters('woocommerce_res...', Array, 'jetpack/stats/v...', 'jetpack/stats', 'visitors', Array)
    #4 /home/www/wordpressDschilani.COM/wp-includes/rest-api/class-wp-rest-server.php(1139): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->get_items(Object(WP_REST_Request))
    #5 /home/www/wordpressDschilani.COM/wp-includes/rest-api/class-wp-rest-server.php(985): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wc-analytics/r...', Array, NULL)
    #6 /home/www/wordpressDschilani.COM/wp-includes/rest-api/class-wp-rest-server.php(412): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #7 /home/www/wordpressDschilani.COM/wp-includes/rest-api.php(354): WP_REST_Server->serve_request('/wc-analytics/r...')
    #8 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(292): rest_api_loaded(Object(WP))
    #9 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
    #10 /home/www/wordpressDschilani.COM/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #11 /home/www/wordpressDschilani.COM/wp-includes/class-wp.php(388): do_action_ref_array('parse_request', Array)
    #12 /home/www/wordpressDschilani.COM/wp-includes/class-wp.php(750): WP->parse_request('')
    #13 /home/www/wordpressDschilani.COM/wp-includes/functions.php(1291): WP->main('')
    #14 /home/www/wordpressDschilani.COM/wp-blog-header.php(16): wp()
    #15 /home/www/wordpressDschilani.COM/index.php(17): require('/home/www/wordp...')
    #16 {main}
      thrown in /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php on line 549
    
    2021-03-27T20:51:41+00:00 CRITICAL Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php:549
    Stack trace:
    #0 /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php(549): array_search('visitors', NULL, true)
    #1 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(292): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->format_data_value(Array, 'jetpack/stats/v...', 'jetpack/stats', 'visitors', Array)
    #2 /home/www/wordpressDschilani.COM/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
    #3 /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php(446): apply_filters('woocommerce_res...', Array, 'jetpack/stats/v...', 'jetpack/stats', 'visitors', Array)
    #4 /home/www/wordpressDschilani.COM/wp-includes/rest-api/class-wp-rest-server.php(1139): Automattic\WooCommerce\Admin\API\Reports\PerformanceIndicators\Controller->get_items(Object(WP_REST_Request))
    #5 /home/www/wordpressDschilani.COM/wp-includes/rest-api/class-wp-rest-server.php(985): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wc-analytics/r...', Array, NULL)
    #6 /home/www/wordpressDschilani.COM/wp-includes/rest-api/class-wp-rest-server.php(412): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #7 /home/www/wordpressDschilani.COM/wp-includes/rest-api.php(354): WP_REST_Server->serve_request('/wc-analytics/r...')
    #8 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(292): rest_api_loaded(Object(WP))
    #9 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
    #10 /home/www/wordpressDschilani.COM/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
    #11 /home/www/wordpressDschilani.COM/wp-includes/class-wp.php(388): do_action_ref_array('parse_request', Array)
    #12 /home/www/wordpressDschilani.COM/wp-includes/class-wp.php(750): WP->parse_request('')
    #13 /home/www/wordpressDschilani.COM/wp-includes/functions.php(1291): WP->main('')
    #14 /home/www/wordpressDschilani.COM/wp-blog-header.php(16): wp()
    #15 /home/www/wordpressDschilani.COM/index.php(17): require('/home/www/wordp...')
    #16 {main}
      thrown in /home/www/wordpressDschilani.COM/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php on line 549
    
    2021-03-28T13:16:07+00:00 CRITICAL Uncaught Error: Call to a member function delete_auth() on null in /home/www/wordpressDschilani.COM/wp-content/plugins/google-analytics-premium/googleanalytics-premium.php:782
    Stack trace:
    #0 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(292): monsterinsights_uninstall_hook('')
    #1 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #2 /home/www/wordpressDschilani.COM/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #3 /home/www/wordpressDschilani.COM/wp-admin/includes/plugin.php(1286): do_action('uninstall_googl...')
    #4 /home/www/wordpressDschilani.COM/wp-admin/includes/plugin.php(967): uninstall_plugin('google-analytic...')
    #5 /home/www/wordpressDschilani.COM/wp-admin/includes/ajax-actions.php(4581): delete_plugins(Array)
    #6 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(292): wp_ajax_delete_plugin('')
    #7 /home/www/wordpressDschilani.COM/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
    #8 /home/www/wordpressDschilani.COM/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #9 /home/www/wordpressDschilani.COM/wp-admin/admin-ajax.php(187): do_action('wp_ajax_delete-...')
    #10 {main}
      thrown in /home/www/wordpressDschilani.COM/wp-content/plugins/google-analytics-premium/googleanalytics-premium.php on line 782
    
    2021-03-28T13:16:18+00:00 CRITICAL Array and string offset access syntax with curly braces is no longer supported in /home/www/wordpressDschilani.COM/wp-content/plugins/php-compatibility-checker/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php on line 453
    
    2021-03-28T16:48:14+00:00 CRITICAL Maximum execution time of 30 seconds exceeded in /home/www/wordpressDschilani.COM/wp-includes/class-wp-image-editor-imagick.php on line 373

    Here gabrielfuentes 🙂 Thanks a lot for your Time and for your replys

    Plugin Support Gabriel F. a11n

    (@gabrielfuentes)

    Hi @dschilani 👋

    It sounds like the following thread might be helpful for you. Could you please follow my colleague’s recommendation and let me know if that works for you?

    https://wordpress.org/support/topic/confirm-form-resubmission-when-clicking-back/

    Cheers 🙂

    Plugin Support abwaita a11n

    (@abwaita)

    Hi @dschilani,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, the linked thread was helpful and you were able to find a solution to your problem!

    If you have further questions, please feel free to open a new topic.

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Confirm form resubmission WordPress single Product Page’ is closed to new replies.