JVE : don't work fine with JCHoptimize

1 year 1 month ago - 1 year 1 month ago #10493 by boucdur
Hello,

I discovered a few days ago that JVE doesn't work smoothly when using JCHoptimize as well.
Apparently the jve js script changes slightly each time a page reload.
JCH groups all the js scripts in one and cache it. But as jve changes it creates a new js all the time instead of using the cached file.

JCH gives a workaround
www.jch-optimize.net/documentation/manage-cache.html
But it is not great as it means giving up using very nice features jch offers. I am forced to put JCH on average :
www.jch-optimize.net/documentation/plugin-options.html
Plus other consequences on my scripts added with sourcerer.

Do you think that can be fixed ?

1 year 1 month ago #10495 by Vitja
Hi Boucdur,

first of all, thank you for activating a support subscription.

The reason is that I need to do an Ajax request to a URL that is not cached. I use the core functionality here (just like the core vote plugin) to count the votes. If I wouldn't add the timestamp to the URL, then the rating function of the article component wouldn't be executed and the rating wouldn't be counted. This is an issue that exists in the core vote plugin.

You can still use the "Optimum" setting but with a small change. Select "Optimum" and click at the bottom on "Automatic Settings Group". There you will find the option "Include in-page javascripts", set it to "No". This should do it!

Have success!

Kubik-Rubik Joomla! Extensions

Please support my work with a review in the Joomla! Extensions Directory: extensions.joomla.org/profile/profile/details/61997
1 year 1 month ago #10503 by boucdur
Hi Victor,

I tried the settings you advised but it doesn't work as a new issue happen when I exclude all in-page javascripts in the jch settings.
I get this error on all pages :
ReferenceError: jQuery is not defined
the consequence is that a few of my scripts don't work and first of all JVE
1 year 1 month ago #10504 by Vitja
Hi Boucdur,

you have to change the position of the combined file as well, sorry for not mentioning it in my first reply.

jQuery has to be loaded before the JVE code is loaded.

Change the Manage combined files option to Preserve execution order.

Greetings

Kubik-Rubik Joomla! Extensions

Please support my work with a review in the Joomla! Extensions Directory: extensions.joomla.org/profile/profile/details/61997
1 year 1 month ago - 1 year 1 month ago #10505 by boucdur
I just made the change but I don't see a difference I still get ReferenceError: jQuery is not defined
I tried to enable jquery easy it case it could do something but apprently no.
I tried to exclude jve in the exclusion option, but it had no effects so I removed all the exclusion options
1 year 1 month ago #10506 by Vitja
Hmm, then you have more dependencies. You have to try out some variations to find the best setting for your website. It's a common issue of such optimization plugins, there is no one best solution.

Of course you could remove the timestamp from the URL but there is still the session token that is required to count the rating. Without the unique token the content component will not store the ratings at all into the database.

Kubik-Rubik Joomla! Extensions

Please support my work with a review in the Joomla! Extensions Directory: extensions.joomla.org/profile/profile/details/61997
1 year 1 month ago #10507 by boucdur
Aie. Ok. Thanks for your help. I'll try to find the right settings. I'll let you know.
Time to create page: 0.135 seconds