Topic-icon Facebook login is not working

Active Subscriptions:

None
2 years 3 months ago #67771 by nikkra
My Like button and comments for Facebook does not work any more, not even after update to 9.0.181. It seems like JFBConnect does not login to Facebook.
I have installed Cookiehint plugin to follow the new EU standard, without any success. The FB app is approved and Live.
When running the error check i get this message:JFBConnect Remote Error CheckChecks performed on: sittbrunnen.se/ Error: Uh oh! We could not fetch page due to an unknown error.

The post/page where the buttons and comments should appear beside Twitter and Linkedin is for example:
www.sittbrunnen.se/nyheter2/farvatten-oc...pp-foer-falska-grund

Regards
Niklas
The topic has been locked.
Support Specialist
2 years 3 months ago #67772 by alzander
Facebook's widgets all require Javascript to load and that Javascript comes from Facebook itself. However, your server is sending a header which is explicitly telling the browser not to load external Javascript files.

This is not only affecting Facebook, but it also looks like your Google Analytics and other features are being denied. The javascript errors look like:


The problematic header is shown here:
 
x-content-security-policy:default-src 'self' 'unsafe-inline'
That tag is telling the browser to only load Javascript files from the current domain and that inline Javascript is ok. External Javascript will be denied.

In addition to the above, there are other Javascript errors you can see in the console. I'm unsure if those are also problematic for loading the Facebook buttons, but you'll need to fix that header tag first.

I hope that helps get you started,
Alex
Attachments:
The topic has been locked.
Active Subscriptions:

None
2 years 3 months ago #67773 by nikkra
Do you know if it is Joomla or my web hotel that sends that header?
The topic has been locked.
Support Specialist
2 years 3 months ago #67774 by alzander
Joomla does not send it on it's own. However, there are some security extensions that probably do send it to try and prevent bad scripts from being run. The tag on your site is very strict about what's allowed (no external Javascript is pretty hard to get by with), so wherever it's coming from, there would have to be an option to disable or ease that up a bit.

An easy way to tell would be to have a plain text file on the site that you could load directly. Since that won't be going through Joomla, you can look for the header and know quickly if it's from something in Joomla or something lower level. I just tried with the robots.txt file and the header was *not* in the response, but that's a special file which may be handled differently no matter what.

I hope that helps give some ideas on where to look.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
2 years 3 months ago #67778 by nikkra
Hello Alex

This seems to be somebody elses problem.

My Joomla specialist she says i should contact my host to change the web server configuration. But my host says they dont add any header, and he has made an empty test page to prove that. He writes:


"Jag har skapat en phpfil: sittbrunnen.se/test.php

Kolla källkoden till filen. Vår server sätter inte X-Frame-Options header

--
Med vänliga hälsningar
Emanuel Solsjö

Websupport
En del av Loopia Group
Teknisk support: 0771-240 800 / This email address is being protected from spambots. You need JavaScript enabled to view it."

So how did you see that header? Could you please tell my how to do it or just check the test page?

Thanks

Niklas Krantz
The topic has been locked.
Support Specialist
2 years 3 months ago #67779 by alzander
Something changed :)

I just went to the site and the header is missing, the Javascript errors are gone and I'm able to see the FB Comment box on the article "Se upp för falska grund".

Not sure what happened, but please test if you're still having issues. The original cause seems gone.. somehow.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
2 years 3 months ago #67780 by nikkra
Strange, thought I cant see it.
Maybe the host removed the head without telling me.
I also found a user DB not activated. Social Profiles - Custom DB
The only X-content I can find is in web.config.txt
<add name="X-Content-Type-Options" value="nosniff" />
I also inactivated CookieHint, wich removed some blockings.
Niklas
The topic has been locked.
Support Specialist
2 years 3 months ago #67787 by alzander

I also found a user DB not activated. Social Profiles - Custom DB

That's fine. The Custom DB plugin allows you to import profile information from a social network into a custom database table on your server. It's used for custom profile imports.

As to the original issue, I'm glad it seems resolved.. however it happened. If you need anything else, don't hesitate to reach out!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
2 years 2 months ago #67803 by nikkra
Sorry, but it is not resolved. The Facebook button and comments is still not working for me.
I now have asked my Joomla specialist to look into it. It looks like it is still problems with x-content-security-policy:default-src 'self' 'unsafe-inline' in the header, and we cant find out where it orgins.
Niklas
The topic has been locked.
Support Specialist
2 years 2 months ago #67806 by alzander
If that header is still present, it's definitely (at least part of) the problem. It's preventing Javascript which is necessary to load on the page for many social network features.

Unfortunately, I can't help narrow down where that is. Since it wasn't showing on a static html page, that means it's most likely something within the Joomla site itself or possibly a server option that's only setting that flag when a PHP file is loaded (though that would be strange).

Either way, I hope your Joomla specialist is able to narrow things down further for you. Please let us know what you are able to figure out.

Thanks,
Alex
The topic has been locked.