Double login problem

More
15 years 5 months ago - 15 years 5 months ago #1 by Julio
Double login problem was created by Julio
Hi all,

I have a Joomla site (v1.5.20) with JomSocial (v1.6.288) and Joomdle (v.0.41). In the Joomdle configuration, I've set the Moodle URL to " www.mysite.com/moodle ". I'm using Moodle v1.9.9.

When I log in using the www ( www.mysite.com ) everything goes fine, I'm logged on both Joomla and Moodle and I'm redirected to my JomSocial profile page ( www.mysite.com/community/profile ).

But if I log in using the URL without www (mysite.com):

- I'm redirected to the same URL ( www.mysite.com/community/profile ) but it seems that i'm not logged in as I only see the login menu. If from that menu I log in again, everything goes fine.
- If instead of logging in again I reload the page nothing changes, I see the login menu again; if I go back (press "left arrow"), I'm redirected to the JomSocial front page ( www.mysite.com/community ) and I'm logged in.
- If instead of logging in again I navigate to the Moodle section ( www.mysite.com/component/joomdle/wrapper ) I appear as logged on Moodle while I appear as not logged on Joomla.

I had the same behaviour with Joomdle 0.3. If I uninstall Joomdle I can log in without problems from both URL's (with and without www).

Any clue why this happens?

Many thanks in advance,

Julio
Last edit: 15 years 5 months ago by Julio.

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: Double login problem
Hi.

www and not-www are different domains, and thus have different sessions.

You should put a redireect rule, to redirect all no-www queries to www.site.com

Antonio

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #3 by Chris
Replied by Chris on topic Re: Double login problem
If you have done rewrite rules before. You can search for the httaccess configuration in the joomla forum.

You will see stuff like this
Code:
RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^example\.com$ RewriteRule ^(.*) http://www.example.com/$1 [R=301]

that needs to be uncommented. But please check with the appropriate rewrite rules as the one I posted above has not been test just copied from a httaccess file

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #4 by Julio
Replied by Julio on topic Re: Double login problem
Hi guys,

Thank you for your quick replay.

Yes, I know that they are different domains, and my Joomla site already has the redirect rule and it has always worked fine. Only when Joomdle is installed I get that kind of "interferences"...

As I said, Joomdle sort of support that redirection, since I can log into Moodle via Joomdle from the not-www URL (and I eventually get logged into Joomla if I go back in the browser). This behaviour puzzles me...

Do you think this is a problem of my Joomla site and its redirection rule? Or can it be a Joomdle issue? Do you have Joomdle installed in any site with this kind of redirection working without problems?

Cheers,

Julio

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago - 15 years 5 months ago #5 by Julio
Replied by Julio on topic Re: Double login problem
By the way, you've done a great job with Joomdle. Congrats!
Last edit: 15 years 5 months ago by Julio.

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic Re: Double login problem
Hi.

You said "you logged on site.com" (no www)

If redirection is configured correctly, when you try to open site.com you are always redirected to www.site.com

So, you never have the chance to log in site.com

Hope I explained myself :)

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #7 by Antonio Durán
Replied by Antonio Durán on topic Re: Double login problem
Btw, you can see this configured it joomdle.com (which gets you to www.joomdle.com )

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #8 by Julio
Replied by Julio on topic Re: Double login problem
antonio wrote:

Btw, you can see this configured it joomdle.com (which gets you to www.joomdle.com )


You're right, I hadn't thought about it... :blush:

But now that you mention that I see that the redirection in my site works "almost" fine... If I type "mysite.com" I'm not really redirected. The page loads, but the URL doesn't change until I navigate the page (for example, trying to log in). Only in that very moment the URL changes to www. And this is why I can try to log in from both the non-www and the www URL's...

I will have to take a look to that.

Thanks a lot,

Julio

Please Log in or Create an account to join the conversation.