SCLogin button not working on http://af.heartslovefree.com/
System page caching is already disabled, so how do i fix this?
af.heartslovefree.com/:1 XMLHttpRequest cannot load http://heartslovefree.com/hlf/modules/m … check.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://af.heartslovefree.com' is therefore not allowed access.
I'm not seeing the issue you report on your site. Are you still having this problem?
I hope that helps explain the problem you reported. If you are still having issues, just let us know.
Hi and thanks for the reply,
I have disabled 2FO, but the issue persists.
I think my issue lies with my configuration file in public $live_site = 'http://www.heartslovefree.com';.
01. ( public $live_site = 'http://www.heartslovefree.com';. ): My main domain and extensions works perfect, but my subdomains don’t.
SUBDOMAINS ISSUE: SCLogin extension login button does not respond and JFBConnect extension login works perfect, but redirects to my live_site ( http://www.heartslovefree.com ).
COMMENT: This is not cool, because a user registering and logging in on http://da.heartslovefree.com should stay on http://da.heartslovefree.com unless they switch language with extension Gtranslate.
02. ( public $live_site = '/';. ):
ISSUE: SCLogin extension login button works perfect and JFBConnect extension login works only with facebook login and not with Google+, Instagram and Yahoo. Plus Jomsocial extension account activation e-mails have broken links:
✉ Hearts Love Free
Thank you for registering at NEW & 100% FREE ► International dating | HEARTS LOVE FREE. Your account is created and must be activated before you can log in.
To activate the account, click on the following link or copy-&-paste it in your browser:
After activation you may login to / using your username and password.
This email was sent to Gizmo ( [email protected] ). If you do not wish to receive these emails from Hearts Love Free, you can unsubscribe here. NEW & 100% FREE ► International dating | HEARTS LOVE FREE
03. ( public $live_site = '';. ):
ISSUE: My website and subdomains ads joomla folder path to URL /hlf/.
SUBDOMAINS ISSUE: SCLogin extension login button does not respond and JFBConnect extension login does not work.
DOMAIN ISSUE: SCLogin extension login button works perfect, but JFBConnect extension login does not work.
CONCLUSION: What’s the right setting and / or configuration?
Best regards Hans Simtanda Caspersen - See more at: http://gtranslate.net/forum/public-live … tml#p19406
XMLHttpRequest cannot load http://www.heartslovefree.com/modules/m … check.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://da.heartslovefree.com' is therefore not allowed access.
However, I'm not sure why the www version of that file is trying to be loaded. How do you have your sub-domains setup to work with your main site? If you're using a 3rd party extension to manage the subdomains while having all content loaded from your 'main' www site, you may need to contact them. The SCLogin module is simply asking 'what is my domain' and trying to load our OTP file from that domain. On your site, even in the sub-domain directory, that question about the domain seems to be returning the www domain instead of the da. one, which isn't right.
As for the $live_site variable, again, this probably should be left blank. The $live_site variable is used by Joomla to 'force' your domain to something instead of using it's auto-detection feature. Since your domain changes, I wouldn't recommend hard-coding it to any value or these types of issues will arise. It should never be a relative path, like /, but only a fully qualified URL.. or, as I'd think, just blank.
So, if you could, let us know a lot more about how the sub-domains feature, language detection and redirection to those domains, and anything else related are working and we can gladly help try to narrow things down further from there.
Hi and thanks a lot for the support.
Yes, I am using a 3rd party extension to generate my multilingual subdomains called Gtranslate Enterprise. You can read about this on http://gtranslate.net/features
Also check out > http://gtranslate.net/forum/public-live … 9dcc6a4984
My $live_site variable is now set to blank, which means that my domain is now adding my Joomla folder in the path: http://heartslovefree.com/2015/
PS: I found this thread on Google, but its too complex for me. Anyway, I think you guys can decode it!
https://jvaneyck.wordpress.com/2014/01/ … avascript/
The $live_site variable should be blank since you're using multiple subdomains, otherwise your subdomains will always redirect to whatever you have configured for your variable.
JFBConnect should just be asking the site for the current domain and URL. I understand you're using GTranslate, but I have no clue how it creates multiple subdomains or how it's altering how Joomla functions.
In our SCLogin module, we have the following line of code:
sclogin.base = '" . JURI::base() . "';\n"
That should be setting the base URL for your Joomla site, which should be the current domain. On your sub-domain, however, that's returning:
JURI::base() is a core Joomla function. You can read about it below:
Something is altering the behavior of JURI::base to return the wrong information. I don't know what is causing that or why it's returning the wrong URL, but it will need to be fixed as that's whats causing your issues. You may want to ask the GTranslate developers if they understand (or are causing) the JURI::base behavior that we're seeing as it may help explain things.
I hope that helps get you started and understanding the issue better. I'm sorry I don't have a magic bullet answer, but on the root/normal domain, things do seem to work. It's whatever is creating those subdomains that seems to be problematic.
the Gtranslate team has replied with the following answer and as a result have moved my site to root directory, so now we want to know which files to edit in order to make below suggestion work:
Try to change sclogin.base = '" . JURI::base() . "';\n" to sclogin.base = '" . JURI::base(true) . "/';\n".
I think currently http://www.heartslovefree.com/ is being redirected internally to http://www.heartslovefree.com/hlf2015/ that is why you see sclogin.base='http://heartslovefree.com/hlf2015/'; as a result on http://www.heartslovefree.com/
We want you to have relative URL for sclogin.base, so when you make the change you will end up having:
Which hopefully will solve the issue.
You may ask Alex about which file should be modified.
BTW. If you are going to move hlf2015 folder contents to root, it would be better if you do it now, to avoid confusion later.
Edvard Ananyan - GTranslate Team
- See more at: http://gtranslate.net/forum/public-live … bdej8.dpuf
That line of code is in the /modules/mod_sclogin/helper.php file at line 153. You'll see something like:
sclogin.base = '" . JURI::base() . "';\n"
Per their instructions, change it to:
sclogin.base = '" . JURI::base(true) . "';\n"
We use JURI::base(true) in other sections of our code, and that should work, but you'll want to make sure you try from various different URLs on your site since a relative path may have issues with SEF URLs.
Keep us posted on how that goes.
That did the trick!
Finally, when i login with social login buttons such as facebook or Google+ from example this subdomain http://da.heartslovefree.com/ i succeed, but i am then redirected to my main domain and from there i can successfully switch language and is successfully redirected to the subdomain with that particular language.
I prefer though to login with social login buttons such as facebook or Google+ from a subdomain and stay on that subdomain after successful login. So witch line of code shall i modify next?