concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Add to cart: loading wheel always active #234

Closed wells00 closed 7 years ago

wells00 commented 7 years ago

After completing the entire site and everything worked out wonderfully, that's where I click on add to the cart and the wheel turns but nothing happens. I tried to figure out what had happened but it seemed all right.

Okay, I did everything from the beginning and it all works but here is the same thing now, the wheel is just turning.

What should I do? Rebuild everything from the beginning?

Environment Information

concrete5 Version

Core Version - 8.1.0 Version Installed - 8.1.0 Database Version - 20170123000000

concrete5 Packages

Breadcrumb Trail Page Links (1.1), Community Store (1.1.5), Community Store Toolbar Buttons (1.0), Login/Logout Link (1.0), Manual Nav (2.1.1), Neat (0.9.2), Paypal Payment Method (1.0), Styled Maps (1.2.3), Vimeo Video (1.0.2)

concrete5 Overrides

languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/en_GB/LC_MESSAGES/messages.mo, languages/en_GB/LC_MESSAGES, languages/en_GB, languages/es_PE/LC_MESSAGES/messages.mo, languages/es_PE/LC_MESSAGES, languages/es_PE, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/en_GB/LC_MESSAGES/messages.mo, languages/en_GB/LC_MESSAGES, languages/en_GB, languages/es_PE/LC_MESSAGES/messages.mo, languages/es_PE/LC_MESSAGES, languages/es_PE, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE

concrete5 Cache Settings

Block Cache - On Overrides Cache - On Full Page Caching - Off Full Page Cache Lifetime - Every 6 hours (default setting).

Server Software

Apache

Server API

cgi-fcgi

PHP Version

5.6.28

PHP Extensions

bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, ionCube Loader, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, session, SimpleXML, soap, SourceGuardian, SPL, sqlite3, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib

PHP Settings

max_execution_time - 300 log_errors_max_len - 1024 max_file_uploads - 40 max_input_nesting_level - 64 max_input_time - 60 max_input_vars - 3000 memory_limit - 256M post_max_size - 55M sql.safe_mode - Off upload_max_filesize - 50M mysql.max_links - Unlimited mysql.max_persistent - Unlimited mysqli.max_links - Unlimited mysqli.max_persistent - Unlimited pcre.backtrack_limit - 1000000 pcre.recursion_limit - 100000 session.cache_limiter - no value session.gc_maxlifetime - 7200 soap.wsdl_cache_limit - 5

Mesuva commented 7 years ago

This sounds like you have a javascript error on the checkbox page or similar.

What you need to do here is open up Chrome's Developer tools and have a look at what is happening when you try adding to the cart. Under the Console tab you may see a javascript error, or if that's not the case you should look at the Network tab and observe the requests. You should see something like the attached in a normal case, but if something is going wrong you should be able to see this via the response - they'll be the HTML of an error page instead of a smaller JSON response.

You should never have to rebuild anything from scratch in situations like this, it's always less work to debug and work out what is causing an issue like this. A rebuild is likely to end up with the exact same error if there's some sort of scripting conflict.

It would help if you you can push this development site up to an accessible URL.

screen shot 2017-05-22 at 9 09 36 am
wells00 commented 7 years ago

This is what is happening when you try adding to the cart, with open up Chrome's Developer tools: schermata 2017-05-27 alle 01 34 17 schermata 2017-05-27 alle 01 33 58

Mesuva commented 7 years ago

I think this might be because you've moved the /cart page at some point

The /cart page needs to stay at the top level in the sitemap, otherwise you'll need to adjust the CARTURL at the bottom of community_store/controller.php to a new path.

wells00 commented 7 years ago

This is my "Site Map": schermata 2017-05-27 alle 15 52 10

Mesuva commented 7 years ago

So what happens when you visit /index.php/cart ? I'd expect to see the actual cart page here

Or if you visit /index.php/cart/add ? I'd expect to see an error message or a blank page

wells00 commented 7 years ago

Perfect. if you visit /index.php/cart see the actual cart page

but you click "add to cart" so you visit /index.php/cart/add see a blank page

Mesuva commented 7 years ago

Ok, in this case my suggestion would be that 'Mod Security' is blocking the post requests to /index.php/cart for some reason.

You could contact the host and ask them to check their mod security logs for this site, to see if they can see any rules being triggered for this url. If they are, you will need to ask them to 'whitelist' them

Otherwise feel free to send through a live URL to ryan@mesuva.com.au and I'll see if I can spot anything

wells00 commented 7 years ago

The first time I installed "CommunityStore" on this specific site, it worked perfectly. Only after almost completing the entire site I noticed that it did not work anymore. As already mentioned just clicked on add to the cart, left the wheel and did not see the cart.

Now I'm trying to redesign the site to the local server, for now everything works fine, just complete I'll put the files and the database on the host server.

We will see what happens.

Mesuva commented 7 years ago

Make you sure understand my point about Mod Security - that's going to be down to the server detecting particular words or type of request, something you won't see on your local server.

wells00 commented 7 years ago

ok. thank you.

wells00 commented 7 years ago

Can I contact you privately in the email you provided to me?

Mesuva commented 7 years ago

Sure. I'm probably going to say the same thing though - you shouldn't ever have to rebuild a site to fix an issue like this

Mesuva commented 7 years ago

Just closing this as I think if it it's an issue it would need to be reopened with more detail

typoman76 commented 3 years ago

A simple note to this. If someone is googling: We had a similiur issue where the sopping cart wasn't loaded. In our case the currency settings where the issue: The sign for dividing the numbers for thousand in our case was: ' for 10'000 So that sign is causing an error in javascript. We used a blank instead and it worked.

Mesuva commented 3 years ago

@typoman76 that's interesting. The currency formatting was reworked not that long ago, it now should be more automatic. Do you know what version of Community Store you were using when this bug happened?