fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Variations not selecting on certain products

Good day,

Some products do not allow me to select the variations.

Please see https://vegavend.com/shop/so-denim-mens-max-slim-jeans/

I think it may be related to the cache, however what does not make sense is that it works on some products.

Please assist…

Kind regards,

Clinton

Hakik Zaman

Hi Clinton,

Thanks for reaching out to us. We are sorry for your inconvenience.

Please flush your object cache. If you have no idea how to do it. Please contact your hosting provider to flush your object cache.

Also, clear your transient from here: https://paste.pics/OGSQB

Then try again.

Thank You

Hi,

I already tried this and just tried it again and it makes no difference.

When I turn the cache off completely it works, so what would  I need to exclude from the cache for it to work?

Kind regards,
Clinton

Hakik Zaman

Hi Clinton,

Please exclude the following path from the caching plugin settings:

CSS Path:

/wp-content/plugins/woo-variation-swatches/assets/css/(.*).css

JS Path:

/wp-content/plugins/woo-variation-swatches/assets/js/(.*).js
/wp-content/plugins/woo-variation-swatches-pro/assets/js/(.*).js

Thank You

Hakik Zaman

Hi Clinton,

Which caching plugin you are using?

Thank You

Hi Hakik,

LiteSpeed Cache on a LiteSpeed server…

Kind regards,

Clinton

Hakik Zaman

Hi Clinton,

Did you flush your object cache from the server-side settings?

If not, please flush it from the server-side settings. Check if you have any other caching services. If so, clean them all.

Also, kindly do a plugin compatibility check by doing these steps to identify the error :

=> Deactivate all of your additional plugins except the WooCommerce and WooCommerce Variation Swatches Plugin.

=> See if the problem persists. If the problem is resolved, you can tell which plugin might be the culprit of this error by activating your additional plugins one by one.

Looking forward to hearing from you soon.

Thank You

I am busy with the plugin compatibility but don’t have a solution yet.

I also tried updating your plugin but it gives an error

Hakik Zaman

Hi Clinton,

I am busy with the plugin compatibility but don’t have a solution yet.

Do you have a staging site with the same setup? If not, please create a staging site using this plugin and give us admin access to that staging site. It will help us to investigate your issue further.

I also tried updating your plugin but it gives an error

Can you please give us details on what error you are facing? A screenshot will be great to understand your issue. You can upload your screenshot here: https://paste.pics/ and post directly the screenshot link.

Hope to hear from you soon.

Thank You

Hakik Zaman

Hi Clinton,

You didn’t add the license key. Please add the license key here: https://paste.pics/OGVHW

Then click here: https://paste.pics/OGVJ1

Note: Before clicking it don’t forget to flush the caches (browser cache, caching plugin cache, and server-side cache).

I am busy creating a fresh staging environment but given the size of the site this will take a while…

Sure, take your time. It will be great to inspect it on the staging site rather than ruin your production site.

Waiting for your feedback.

Thank You

I have now disabled the Pro plugin as all the errors I get are when it is active.

You have the details for the staging and we can see if we can get it to work there before trying it on the production site.

I can tell you it is not related to the cache or another plugin.

Please let me know what you find as I would like to use your plugin for dual colours etc.

Kind regards,

Clinton

Hakik Zaman

Hi Clinton,

I have tested it on your staging site. From my inspection, some core JS file is not loading for the not-logged-in visitor.

I have also read the Litespeed documentation to identify the error. As per their documentation, I have disabled all the features of LiteSpeed Cache and the swatches were working as expected for both logged-in and not-logged-in users. Please check this screenshot to test it yourself: https://paste.pics/OHOR8

I think there are some configuration issues. Please contact the super support team from LiteSpeed. I hope they can show you the right direction to configure it properly.

Thank You

Hi Hakik,

I already said this to you three days ago…

Unfortunately unless ALL Litespeed feature are disabled, your plugin does not work… even with its most basic preset settings with no real optimisation… the moment it caches, your plugin doesn’t work. (on a few products)

This is the reason I asked for:

CSS Path:

/wp-content/plugins/woo-variation-swatches/assets/css/(.*).css

JS Path:

/wp-content/plugins/woo-variation-swatches/assets/js/(.*).js
/wp-content/plugins/woo-variation-swatches-pro/assets/js/(.*).js

to see if I could bypass it, but it made no difference as the issue is before any real optimisation.

I will try and do some more testing to see if I can isolate exactly what it is that causes the issue once cached. unfortunately the issue only appears after caching and that takes a while.

If you have any other ideas, please let me know.

Kind regards,

Clinton

Hakik Zaman

Hi Clinton,

Our plugin’s JS has a dependency on wp. Which is not loading properly: https://paste.pics/OHOT4 on your site.

I will try and do some more testing to see if I can isolate exactly what it is that causes the issue once cached. unfortunately the issue only appears after caching and that takes a while.

I think the best way to resolve this is to contact LiteSpeed Support. They will know better about their plugin configuration than us.

Thank You

Good day,

I still have this issue and after going in many circles this is the reply I now have from litespeed.

_____________

It sounds like a nonce issue

Nonces often expire before the site TTL, and this can be problematic for the pages that use them. By converting a nonce to an ESI block, you allow the nonce to expire independently of the rest of the page, without causing any cache conflicts.

More https://docs.litespeedtech.com/lscache/lscwp/cache/#esi-nonce

So if you know the nonce name(or contact the site dev or theme dev), please add them to the Nonce block of the LSCWP. Or, shorten the public cache TTL.

_______________

Please could you tell me the nonce name for:

The woo-variations

Looking forward to your response.

Kind regards,

Clinton

Hakik Zaman

Hi Clinton,

Here is the only nonce we have in our plugin: woo_variation_swatches_admin

Thank You

Good morning Hakik,

I reopened this ticket just to give you some feedback and not because I have an issue. 🙂

After over a year I was struggling with this issue and as it only appeared after a couple of days it was almost impossible to solve.

None the less I have finally solved it.

It was caused by a WordPress nonce not being added to the Litespeed nonces. Namely: _wpnonce

After adding this the issue is completely gone. 🙂

Just wanted to let you know if you every encounter this issue again.

Kind regards,

Clinton

 

Hakik Zaman

Hi Clinton,

Thanks a lot for sharing it with us.

Can you please give any guidelines on how to add it?

Or, a screenshot where this should be added?

Hope to hear from you soon.

Thank You

Hi Hakik,

In the admin panel navigate – Litespeed -> Cache -> ESI

Then add _wpnonce to the ESI Nonces

Kind regards,

Clinton