• Resolved prateek9

    (@prateek9)


    hello all, i am using woocommerce plugin and added a test product (simple product),
    it is displaying in shop but when i click “Add to cart” button below the product listing – Nothing happens!!!
    i tried by enable & disable AJAX.
    i found that if i open the specific product and then use add to cart – it worked fine .

    i am unable to get it sorted – please help me out !!!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    An example URL would be helpful.

    Thread Starter prateek9

    (@prateek9)

    Plugin Contributor Mike Jolley

    (@mikejolley)

    The request is being blocked https://dl.dropboxusercontent.com/s/4dr5igb6pqjaws9/2016-05-19%20at%2011.25.png?dl=0 Looks like a server problem. What host? Is this NGINX or apache?

    Thread Starter prateek9

    (@prateek9)

    I Dont know about that host thing.
    Actually i am not so technical sound.
    I am hosting on bluehost please tell me how to do that?

    Plugin Contributor Mike Jolley

    (@mikejolley)

    You could ping bluehost – I’m not sure what would cause the 403 error either.

    Thread Starter prateek9

    (@prateek9)

    Just contact them tjey send the following details and i m not able to understand the same please tell me if you get –

    I have checked the logs of hemucraft.com and found the following error messages:-

    ——
    [Thu May 12 07:55:53 2016] [warn] [client 49.200.243.247] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi, referer: https://www.hemucraft.com/setup/
    [Thu May 12 07:55:57 2016] [warn] [client 49.200.243.247] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi, referer: https://www.hemucraft.com/admin_founder/admin/dashboard/index/key/89e39e76f7227b191fd5ecd69fae45cf616738795d355e690e50a52c2e602e7f/
    [Sat May 14 05:32:08 2016] [warn] [client 49.200.244.17] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi, referer: https://www.hemucraft.com/setup/
    [Sat May 14 05:33:12 2016] [warn] [client 49.200.244.17] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi, referer: https://www.hemucraft.com/setup/
    [Sat May 14 05:34:42 2016] [warn] [client 49.200.244.17] mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php-fcgi, referer: https://www.hemucraft.com/admin_founder/admin/index/index/key/695fb999089ecca9af8d51bbb3de7de02748e010db1165085d2fda6ead26f21d/
    ——

    The issue that you are facing is mainly due to saturation of the number of fcgi processes allocated for your account. We allow 5 child process and for each child process, 256 worker processes. Once that limit is breached, you see that kind of error. However, those errors are auto-fixed once the number of processes reduce.

    Killed queries for the database(s):-
    —————————-
    hemuck62_mage749
    hemuck62_wp344
    hemuck62_wp360
    hemuck62_wp894

    Also, the following error message regarding the database(s):-

    ——
    2016-05-15 12:38:59 +0000 [info] killed_thread_id:64505172 user:hemuck62_mage749 host:localhost db:hemuck62_mage749 command:Sleep time:22 query:
    2016-05-15 12:45:14 +0000 [info] killed_thread_id:64513757 user:hemuck62_mage749 host:localhost db:hemuck62_mage749 command:Sleep time:24 query:
    ——
    ——
    2016-05-15 17:36:17 +0000 [info] killed_thread_id:64695211 user:hemuck62_wp344 host:localhost db:hemuck62_wp344 command:Sleep time:26 query:
    2016-05-15 17:36:57 +0000 [info] killed_thread_id:64695741 user:hemuck62_wp344 host:localhost db:hemuck62_wp344 command:Sleep time:23 query:
    ——
    ——
    2016-05-15 03:18:14 +0000 [info] killed_thread_id:64032222 user:hemuck62_wp360 host:localhost db:hemuck62_wp360 command:Sleep time:22 query:
    2016-05-15 12:53:34 +0000 [info] killed_thread_id:64519692 user:hemuck62_wp360 host:localhost db:hemuck62_wp360 command:Sleep time:23 query:
    ——
    ——
    2016-05-14 18:00:44 +0000 [info] killed_thread_id:63794887 user:hemuck62_wp894 host:localhost db:hemuck62_wp894 command:Sleep time:24 query:
    2016-05-14 18:01:14 +0000 [info] killed_thread_id:63795212 user:hemuck62_wp894 host:localhost db:hemuck62_wp894 command:Sleep time:24 query:
    ——
    ——

    The MySQL queries for the above mentioned databases are getting killed by the server which is causing the intermittent issue with the site loading. You can verify the same from cPanel >> Health checks and Monitoring >> Mysql Killed Queries.

    Please note that, the long_query_time set for the MySQL service is 20 seconds.
    Since it is a shared server, we can’t alter this values for single domain. We have set this limit carefully to avoid any wastage/abuse of server resources and increasing the limit will result in degradation of server’s performance.

    We could see also that the following Modsecurity rules blocking the access to the website.

    Mod_security is used to block commonly known exploits by use of regular expressions and rule sets and is enabled on all our servers by default. Mod_Security can potentially block common code injection attacks which strengthens the security of the server.


    https://support-tools.com/?9d7fa8ecffa1bfd4#dNb5dYa/ozstGWAuxVy2sGD0ufupgzDfEnPN1nPu5bE=

    Hence, we strongly recommend to contact your developer and optimize the database queries and PHP scripts for the better performance of the site.

    Alternatively, you can switch to our VPS package, where you can set custom limits for your domain.

    Do let us know if you have any further queries.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    The modsecurity rule is probably to blame in this case https://stackoverflow.com/questions/18226521/modsecurity-maximum-post-limits-pcre-limit-errors

    However it doesn’t explain why the ‘https://hemucraft.com/shop/?wc-ajax=add_to_cart’ URL 404s either.

    Bluehost does also run varnish caching on it’s servers which can prevent WooCommerce adding to cart if not configured correctly.

    Thread Starter prateek9

    (@prateek9)

    the issue has been resolved,
    thanks alot for your response,
    actually i was having another folder in the root by the name shop !!!
    its working fine now.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘add to cart button not working on woocommerce shop page’ is closed to new replies.