- Posts: 3
R0.25 No Longer Supported
Joomdle + Virtuemart sign-up hiccup
- Ryan Cooper
- Topic Author
- Offline
- New Member
-
Less
More
15 years 1 month ago #1
by Ryan Cooper
Joomdle + Virtuemart sign-up hiccup was created by Ryan Cooper
I have Joomdle and VirtueMart set up and working well together, but am running into one issue.
I have "New User Account Activation" set to "No" in Joomla's Global Configuration. Now, when a user signs up via the VirtueMart checkout process, they automatically get logged in... but they are not brought to the checkout page (as you would expect) after registering. They are bounced back to the Joomla homepage.
A bit of digging revealed that when the onLoginUser event is triggered in Joomla, JDispatcher.trigger() is not returning. Something seems to be hanging with one of the observables that is getting notified. It seems to be an observer provided by Joomdle, since if I do a var_dump($observable) I get a bunch of mentions of "plgUserJoomdlehooks", "plgSystemJoomdlesession", etc.
Does anyone have any idea what could cause this, and how I could go about fixing it?
Thanks,
Ryan
I have "New User Account Activation" set to "No" in Joomla's Global Configuration. Now, when a user signs up via the VirtueMart checkout process, they automatically get logged in... but they are not brought to the checkout page (as you would expect) after registering. They are bounced back to the Joomla homepage.
A bit of digging revealed that when the onLoginUser event is triggered in Joomla, JDispatcher.trigger() is not returning. Something seems to be hanging with one of the observables that is getting notified. It seems to be an observer provided by Joomdle, since if I do a var_dump($observable) I get a bunch of mentions of "plgUserJoomdlehooks", "plgSystemJoomdlesession", etc.
Does anyone have any idea what could cause this, and how I could go about fixing it?
Thanks,
Ryan
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7861
15 years 1 month ago #2
by Antonio Durán
Replied by Antonio Durán on topic Re: Joomdle + Virtuemart sign-up hiccup
Yes, that is joomdlehooks acting.
As of how Moodle sessions work, we need to redirect the user there to make SSO, thus breaking the dispatcher flow.
Currently, there is no way to change this. We hope this can be improved in Moodle 2.0.
That said, there may be a solution for you: are you using the same domain for both Joomla and Moodle?
As of how Moodle sessions work, we need to redirect the user there to make SSO, thus breaking the dispatcher flow.
Currently, there is no way to change this. We hope this can be improved in Moodle 2.0.
That said, there may be a solution for you: are you using the same domain for both Joomla and Moodle?
Please Log in or Create an account to join the conversation.
- Ryan Cooper
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
15 years 1 month ago #3
by Ryan Cooper
Replied by Ryan Cooper on topic Re: Joomdle + Virtuemart sign-up hiccup
Yes, Joomla and Moodle are on the same domain.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7861
15 years 1 month ago #4
by Antonio Durán
Replied by Antonio Durán on topic Re: Joomdle + Virtuemart sign-up hiccup
For what I am going to suggest you need R0.26 or later (R0.3 should be released today, tell me if you want me to send you an early copy by email) and have cURL enabled.
In the joomdlehooks plugin, at the end of the onLoginUser function, there is this code:
Just comment the fist line, and uncomment the last one.
This will use a new method I coded to make SSO work without redirection. I finally decided not to use it because it only works when Joomla and Moodle are on the same domain, due to cookie security restrictions.
I have not really tested it much, but I remember it worked
If you want to test and report back, and it does the job, we could think of enabling it by config option for next releases.
In the joomdlehooks plugin, at the end of the onLoginUser function, there is this code:
Code:
$app->redirect($moodle_url."/auth/joomdle/land.php?username=$username&token=$token&use_wrapper=0&create_user=0&wantsurl=$login_url" );
// Metodo nuevo con cURL
//plgUserJoomdlehooks::log_into_moodle ($username, $token);
Just comment the fist line, and uncomment the last one.
This will use a new method I coded to make SSO work without redirection. I finally decided not to use it because it only works when Joomla and Moodle are on the same domain, due to cookie security restrictions.
I have not really tested it much, but I remember it worked
If you want to test and report back, and it does the job, we could think of enabling it by config option for next releases.
Please Log in or Create an account to join the conversation.
- Ryan Cooper
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
15 years 1 month ago #5
by Ryan Cooper
Replied by Ryan Cooper on topic Re: Joomdle + Virtuemart sign-up hiccup
Thanks, Antonio!
It looks like our requirements may be changing and we may be going back to using New User Account Activation anyway. But if not, I will definitely give this a try and will report back.
It looks like our requirements may be changing and we may be going back to using New User Account Activation anyway. But if not, I will definitely give this a try and will report back.
Please Log in or Create an account to join the conversation.