Experiencing a 401 Unauthorized Error During Update?
If you're seeing a 401 Unauthorized error when trying to update your Joomla extension, it's likely due to our new two-factor authentication (2FA) security measure for your Download ID.
To resolve this, check your email (Spam folder?) for a message to approve your server or device, or read our detailed blog post here(
onlinecommunityhub.nl/best-practice/new-...-extension-downloads) to understand the steps involved. This will guide you through approving your server for future updates.
No bug ochJSsocials does not work in Chrome Based browsers
- Alex Baillie
- Topic Author
- Offline
- Posts: 21
- Thank you received: 0
Please Log in to join the conversation.
- Ruud van Lent
- Offline
- Posts: 1640
- Thank you received: 107
thanks for reaching out.
When looking at the page provided I can confirm that the buttons are visible in FF and not in Chrome.
When looking at the browser console in Chrome I see that there is an error: jQuery.Deferred exception: jQuery(...).jsSocials is not a function
My quess here is that you have enabled some sort of optimization to the page where scripts are deferred but not in the regular way (but via a script?)
When looking at the page source I see the following code for scripts (not just jssocials):
the type set is not correct as that should according to web standards be text-javascript and not what it is now (some custom type).
If you are using a component or plugin for optimizing, can you disable that to see if it then works again?
If so, can you exclude jssocials from this optimization?
from trying to analyze this from the page source I think it is caused by rocket-loader?
Please Log in to join the conversation.
- Alex Baillie
- Topic Author
- Offline
- Posts: 21
- Thank you received: 0
Thank you!
Alex
Please Log in to join the conversation.
- Ruud van Lent
- Offline
- Posts: 1640
- Thank you received: 107
Is it possible in rocketloader to exclude specific scripts (I know other optimizing tools allow this)?
Please Log in to join the conversation.
- Alex Baillie
- Topic Author
- Offline
- Posts: 21
- Thank you received: 0
Good point, I will open a ticket with CloudFlare.I think this is a 'bug' in rocketloader and should be fixed there. I think this bug was triggered with a chrome update
As far as excluding scripts. Cloudflare does that only on a page level. In order to exclude a script it needs to be done via the method I suggested earlier (add data-cfasync="false" to the script tag). I also know some Joomla extension developers that create a Rocket Loader compatibility switch in their extension to be able to use it with Rocket Loader, so in other words to include and not exclude it from Rocket Loader. But, I do not know what it actually does.
Please Log in to join the conversation.
- Ruud van Lent
- Offline
- Posts: 1640
- Thank you received: 107
Thing here is, that when you add that data attribute to the script element, it also stops loading on FireFox. Therefore this is not an option for me to add this to the plugin itself (as said; this should be fixed where the root cause is > the jssocials script is a regular script depending on jquery being loaded so if this is causing an issue specifically in chrome, in combination with cloudflare then there are likely other scripts having the same issue)
If you want to add the data attribute yourself you need to change the following file: ./media/plg_content_ochjssocials/joomla.asset.json
and change this:
to this:
so basically just the attribute. Note that JSON is not 'forgiving', so forgetting a , or adding an additional one will crash things on your site!
Please Log in to join the conversation.
- Alex Baillie
- Topic Author
- Offline
- Posts: 21
- Thank you received: 0
Thanks for letting me know the code and workaround. It will help me a lot.
About:
Thing here is, that when you add that data attribute to the script element, it also stops loading on FireFox
It should not be included in Firefox as well. I was not suggesting it as a fix to the current issue, but rather to give your clients a choice to include the ochJSsocials script in Rocket Loader or not. There might be other scenarios someone would not want to include it in Rocket Loader.
Please Log in to join the conversation.
- Ruud van Lent
- Offline
- Posts: 1640
- Thank you received: 107
Thing here is that CloudFlare modifies the page totally beyond our control by altering the final result.
Issue here is in the cloudflare script in combination with Chrome based browsers and should be fixed in their script: either fixing the root cause or by catching and handling these errors.
ocJSsocials is just the messenger here exposing the CloudFlare issue.
Please Log in to join the conversation.
- Alex Baillie
- Topic Author
- Offline
- Posts: 21
- Thank you received: 0
It seems like what I'm trying to convey isn't coming across clearly. Essentially, what I'm suggesting is a function that determines whether the ochJSsocials script should be included in Rocket Loader or not. A simple on/off switch in the ochJSsocials plugin settings. This function would be browser-agnostic and unrelated to the current issue at hand. Its sole purpose would be to offer your customers the choice to exclude the ochJSsocials script from Rocket Loader. Consequently, the script would be included in the web page's HTML code as originally intended by you, ensuring its proper integration and functionality.
Thanks!
Alex
Please Log in to join the conversation.
- Ruud van Lent
- Offline
- Posts: 1640
- Thank you received: 107
I'm always reluctant to build in workarounds for other products their (possible) issues.
It will become obsolete the moment they fix it and then the 'issue' / cost is on my side to maintain that workaround.
I have done some research on rocket loader and I see there are multiple JS issues where it states that it is not fully JavaScript compatible (also saw some recent with specific Chrome issues)
They advise to contact their support and raise an issue so they can investigate / test on your site (they can do that remote without you doing anything). Or they advise to just switch it off when not compatible.
Did you open a support ticket with them? If so what is the outcome?
Please Log in to join the conversation.