smartstore / Smartstore

A modular, scalable and ultra-fast open-source all-in-one eCommerce platform built on ASP.NET Core 7
http://www.smartstore.com/
GNU Affero General Public License v3.0
1.2k stars 447 forks source link

`Select2` component does not initialize on some machines and therefore does not offer items for selection #757

Open cpyne opened 1 year ago

cpyne commented 1 year ago

Describe the bug Rule Conditions related to Shipping Country does not display country list. List displays a large box with no data in it. Country is the key parameter where I've seen this issue, but I have also noticed it with a few other parameters when testing

To Reproduce Steps to reproduce the behavior:

  1. Create a new rule - (customer or product)
  2. Rule condition - Shipping Country - "In"
  3. No country list displayed

Expected behavior A country list should be displayed so rule condition can be completed

Screenshots image

Desktop (please complete the following information):

Additional context I've tried this multiple different fresh smart store installs and always hit the same problem. Possibly I'm missing some required set up step, so apologies if this is in error. I'm running SmartStore in Azure in a Azure Web App with Azure SQL DB, (tried with Azure PGSQL too and had the same problem)

mgesing commented 1 year ago

Unfortunately, I can't reproduce this. This looks like a JavaScript error. The Select2 component used for selecting such lists does not initialize on your system. Therefore, it does not display any items for selection. Does the browser's developer console show any client scripting errors? Do you also have this problem with Firefox?

cpyne commented 1 year ago

I just tried this on another machine and it works fine. It looks like there must be something wrong with my primary machine.

On the working machine, I see "select2" appear as soon as I cIick in the country list. On the non working machine, nothing happens when I click here.

I tried F12 in Edge and see a few verbose messages which occur when I first connect to my site, but I'm not sure if these mean anything or are just be noise messages. I don't see any events happen when I click the country box.

thanks for your help here.

image

mgesing commented 1 year ago

The verbose messages has nothing to do with the problem. On the rule edit page you should get an error message in the console, but it looks like you're not getting any there, which is very strange.

cpyne commented 1 year ago

Other than a few misc verbose messages under F12, I don't see anything different between the good and bad machine. Select2 just never happens on the bad one. If there is anything you want me to try to help debug this, just let me know. (Not urgent since I now can use the other machine and it is pretty rare that I'll actually need to create this type of rule)