- Posts: 31
[Solved] Internal Server Error On Moodle Logout
- Jeff Paul
- Topic Author
- Offline
- Junior Member
-
Less
More
14 years 4 months ago - 14 years 3 months ago #1
by Jeff Paul
[Solved] Internal Server Error On Moodle Logout was created by Jeff Paul
Joomdle seems to be working fine in all aspects of account creation, editing and info passing back and forth between Moodle, Joomla/Joomdle and JomSocial, except...
1. 500 Internal Server Error when a Joomdle-authenticated user logs out from the Moodle Side. (A browser refresh fixes the issue, but this will be an unacceptable remedy when we go live.)
2. Correctly enrolled users can not enter the Moodle FrontPage from the JomSocial Joomdle link until after they have visited a course. (Once they've opened a course, they can then go back to the Jomsocial page and use the E-Learning tab to enter their "Overview of Courses" but still not enter the Moodle front page.)
The core seems to be synching perfectly so I don't think it's anything drastic, but these two errors when logging in or out will be a concern to users. Has anyone had a similar situation and found a remedy?
1. 500 Internal Server Error when a Joomdle-authenticated user logs out from the Moodle Side. (A browser refresh fixes the issue, but this will be an unacceptable remedy when we go live.)
2. Correctly enrolled users can not enter the Moodle FrontPage from the JomSocial Joomdle link until after they have visited a course. (Once they've opened a course, they can then go back to the Jomsocial page and use the E-Learning tab to enter their "Overview of Courses" but still not enter the Moodle front page.)
The core seems to be synching perfectly so I don't think it's anything drastic, but these two errors when logging in or out will be a concern to users. Has anyone had a similar situation and found a remedy?
Last edit: 14 years 3 months ago by Antonio Durán.
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
14 years 4 months ago #2
by Chris
Replied by Chris on topic Re: Internal Server Error On Moodle Logout
At first read, the 2nd issue appears to be a bug. Once Antonio returns from holidays, I have him look at this.
For the first, most times this error appears because of a server configuration error
- Are you using .htaccess for redirection, replacement, security or otherwise? You may want to try without temporarily to see if the message still occurs
- Does it take a while and eventually time out or appear immediately?
- What is the link you are trying to connect to?
- What is the button you are pressing to log out / from which page?
For the first, most times this error appears because of a server configuration error
- Are you using .htaccess for redirection, replacement, security or otherwise? You may want to try without temporarily to see if the message still occurs
- Does it take a while and eventually time out or appear immediately?
- What is the link you are trying to connect to?
- What is the button you are pressing to log out / from which page?
Please Log in or Create an account to join the conversation.
- Jeff Paul
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 31
14 years 4 months ago #3
by Jeff Paul
Replied by Jeff Paul on topic Re: Internal Server Error On Moodle Logout
Thanks Chris.
I'm not using an .htaccess file in the Moodle folder. I'll double check my php.ini file to see if it is doing something funny. Is there something specific I should be looking for? (Since everything else seems to run perfectly, I'm hesitant to start messing around with it but I guess I have no choice.)
The 500 internal server error in Moodle comes up immediately upon touching the Logout button in the top right corner of Moodle 1.9 beside the user photo. I'm not sure where it's trying to go but I imagine it's just trying to perform the standard logout that is supposed to leave you on the same Moodle page but in logged-out mode. (although I'm not sure if the Joomdle plugin for Moodle modifies the stock logout routine.)
Since it's inside the Joomdle wrapper, I'd be fine with that but would love it to exit to the home page of joomla like the Joomla/Joomdle/JomSocial logout is set up to do. That way the refresh would have been done automatically and both the Joomla and Moodle log-outs would be shown in the same logged out state and ready for the next log-in.
I'm not using an .htaccess file in the Moodle folder. I'll double check my php.ini file to see if it is doing something funny. Is there something specific I should be looking for? (Since everything else seems to run perfectly, I'm hesitant to start messing around with it but I guess I have no choice.)
The 500 internal server error in Moodle comes up immediately upon touching the Logout button in the top right corner of Moodle 1.9 beside the user photo. I'm not sure where it's trying to go but I imagine it's just trying to perform the standard logout that is supposed to leave you on the same Moodle page but in logged-out mode. (although I'm not sure if the Joomdle plugin for Moodle modifies the stock logout routine.)
Since it's inside the Joomdle wrapper, I'd be fine with that but would love it to exit to the home page of joomla like the Joomla/Joomdle/JomSocial logout is set up to do. That way the refresh would have been done automatically and both the Joomla and Moodle log-outs would be shown in the same logged out state and ready for the next log-in.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7861
14 years 4 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic Re: Internal Server Error On Moodle Logout
Hi.
First, I assume you are running R.54. If not, please upgrade.
What you describe as desired behaviour is how it is actually supposed to work.
For 1) I don't know what is happening. Do manual moodle accounts log out fine?
For 2) It seems the userhooks plugin is not logging the users in moodle on joomla login, so maybe you have it disabled, or not correctly configured (check that redirect-less sso is off)
First, I assume you are running R.54. If not, please upgrade.
What you describe as desired behaviour is how it is actually supposed to work.
For 1) I don't know what is happening. Do manual moodle accounts log out fine?
For 2) It seems the userhooks plugin is not logging the users in moodle on joomla login, so maybe you have it disabled, or not correctly configured (check that redirect-less sso is off)
Please Log in or Create an account to join the conversation.
- Jeff Paul
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 31
14 years 4 months ago #5
by Jeff Paul
Replied by Jeff Paul on topic Re: Internal Server Error On Moodle Logout
Thanks Antonio, yes I'm using .54.
1. Manual and email moodle accounts log out fine when in Moodle but not from within the Joomdle wrapper since they're not synched anyway. Only Joomdle-authed Moodle accounts bring up the server error, then a browser refresh corrects it on both the Moodle wrapper and the Joomla side.
2. I had redirectless set to on since I thought that's the way it should be if using curl. I took it off and it seems to correct the issue of the E-Learning tab in JomSocial. I can now click that menu item and goto the Moodle "Overview of Courses" directly logged in without having to visit a course first. (still won't go to the Moodle front page even though that's where I thought this menu item is supposed to link to.)
The logout 500 server error still occurs for Joomdle authenticated Moodle accounts only with redirectless set to off, or on, or every other combo I've tried. Strange since the synching of the accounts is working perfectly (adding/deleting/editing.) It's just trying to logout from the Moodle side.
1. Manual and email moodle accounts log out fine when in Moodle but not from within the Joomdle wrapper since they're not synched anyway. Only Joomdle-authed Moodle accounts bring up the server error, then a browser refresh corrects it on both the Moodle wrapper and the Joomla side.
2. I had redirectless set to on since I thought that's the way it should be if using curl. I took it off and it seems to correct the issue of the E-Learning tab in JomSocial. I can now click that menu item and goto the Moodle "Overview of Courses" directly logged in without having to visit a course first. (still won't go to the Moodle front page even though that's where I thought this menu item is supposed to link to.)
The logout 500 server error still occurs for Joomdle authenticated Moodle accounts only with redirectless set to off, or on, or every other combo I've tried. Strange since the synching of the accounts is working perfectly (adding/deleting/editing.) It's just trying to logout from the Moodle side.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7861
14 years 4 months ago #6
by Antonio Durán
Replied by Antonio Durán on topic Re: Internal Server Error On Moodle Logout
On the 500 error, what URL (no domain needed) is on the address bar?
Please Log in or Create an account to join the conversation.
- Jeff Paul
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 31
14 years 4 months ago #7
by Jeff Paul
Replied by Jeff Paul on topic Re: Internal Server Error On Moodle Logout
before click, the browser address says:
www.mysite.com/edu/index.php?option=com_...er&Itemid=12&lang=en
after click, the same:
www.mysite.com/edu/index.php?option=com_...er&Itemid=12&lang=en
The menu bar of the joomla template remains after clicking, the wrapper contents changes from the "Overview of Courses" page to the internal server page warning.
When I hover on the Moodle Logout button, it says it's going to use:
www.mysite.com/moodle/login/logout.php?sesskey=S6YGTDdqr5
After clicking and the server error shows up, if I do a browser page back and hover again, it says the same but the session key has changed. If instead of paging back I refresh the browser, it shows the moodle correctly logged out.
www.mysite.com/edu/index.php?option=com_...er&Itemid=12&lang=en
after click, the same:
www.mysite.com/edu/index.php?option=com_...er&Itemid=12&lang=en
The menu bar of the joomla template remains after clicking, the wrapper contents changes from the "Overview of Courses" page to the internal server page warning.
When I hover on the Moodle Logout button, it says it's going to use:
www.mysite.com/moodle/login/logout.php?sesskey=S6YGTDdqr5
After clicking and the server error shows up, if I do a browser page back and hover again, it says the same but the session key has changed. If instead of paging back I refresh the browser, it shows the moodle correctly logged out.
Please Log in or Create an account to join the conversation.
- Jeff Paul
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 31
14 years 4 months ago #8
by Jeff Paul
Replied by Jeff Paul on topic Re: Internal Server Error On Moodle Logout
Update:
a. The Joomdle E-Learning menu link is logging in correctly after turning redirectless sso off.
b. The user can go directly to the moodle front page rather than the user's my moodle page (this is a known Moodle bug, NOT Joomdle. The solution for 1.9 users can be found on moodle.org under front page issues.)
Pending:
Joomdle-authenticated users get an internal server error when logging out of Moodle, either from within the Joomla's moodle wrapper or directly in standalone Moodle. This also causes the redirect out of moodle to not work properly so the Joomla screen still shows the user logged in until after a refresh. I suspect once the server error is solved, the second issue of redirect/refreshment will be solved along with it.
PS:
I must say, I don't envy Antonio and Chris for dealing with a product that relies heavily on two other dynamic(and potentially volatile) open source packages such as Moodle and Joomla, not to mention all the server flavors and multiple 3rd party extensions that can wreak havoc on any given install. I am very grateful for your product and support!
a. The Joomdle E-Learning menu link is logging in correctly after turning redirectless sso off.
b. The user can go directly to the moodle front page rather than the user's my moodle page (this is a known Moodle bug, NOT Joomdle. The solution for 1.9 users can be found on moodle.org under front page issues.)
Pending:
Joomdle-authenticated users get an internal server error when logging out of Moodle, either from within the Joomla's moodle wrapper or directly in standalone Moodle. This also causes the redirect out of moodle to not work properly so the Joomla screen still shows the user logged in until after a refresh. I suspect once the server error is solved, the second issue of redirect/refreshment will be solved along with it.
PS:
I must say, I don't envy Antonio and Chris for dealing with a product that relies heavily on two other dynamic(and potentially volatile) open source packages such as Moodle and Joomla, not to mention all the server flavors and multiple 3rd party extensions that can wreak havoc on any given install. I am very grateful for your product and support!
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7861
14 years 4 months ago #9
by Antonio Durán
Replied by Antonio Durán on topic Re: Internal Server Error On Moodle Logout
Hi.
If you have some PHP experience, you could try doing some code changes to try to isolate the error.
Fir thing I would try is put a:
return;
at the first line of logoutpage_hook() function in moodle/auth/joomdle/auth.php
This would in fact disables single log out, so I guess the internal error should be gone.
Then I would move the return down, one line at a time, testing each time, until you get the error again.
If you have some PHP experience, you could try doing some code changes to try to isolate the error.
Fir thing I would try is put a:
return;
at the first line of logoutpage_hook() function in moodle/auth/joomdle/auth.php
This would in fact disables single log out, so I guess the internal error should be gone.
Then I would move the return down, one line at a time, testing each time, until you get the error again.
Please Log in or Create an account to join the conversation.
- Jeff Paul
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 31
14 years 4 months ago #10
by Jeff Paul
Replied by Jeff Paul on topic Re: Internal Server Error On Moodle Logout
Antonio: I wish I knew PHP much better than I do, but at least I can attempt this.
The first reoccurence of the error comes when I place the return; directly after this line:
$redirect = get_config (NULL, 'joomla_url').'/components/com_joomdle/views/wrapper/getout.php';
That line then is looking for the getout.php from the Joomdle Joomla componenent which I've copied in its entirety below:
<?php
// If anyone reads this code and comes with a better way to do it, please tell me
$uri = $_SERVER;
$host = $_SERVER;
//print_r ($_SERVER);
//exit ();
$path = strstr ($uri, '/components/com_joomdle/views/wrapper/getout.php');
$len = strlen ($uri);
$len2 = strlen ($path);
$root = substr ($uri, 0, $len - $len2);
$root = 'http://'.$host.$root;
?>
<script type="text/javascript">
top.location.href = "<?php echo $root; ?>";
</script>
The first reoccurence of the error comes when I place the return; directly after this line:
$redirect = get_config (NULL, 'joomla_url').'/components/com_joomdle/views/wrapper/getout.php';
That line then is looking for the getout.php from the Joomdle Joomla componenent which I've copied in its entirety below:
<?php
// If anyone reads this code and comes with a better way to do it, please tell me
$uri = $_SERVER;
$host = $_SERVER;
//print_r ($_SERVER);
//exit ();
$path = strstr ($uri, '/components/com_joomdle/views/wrapper/getout.php');
$len = strlen ($uri);
$len2 = strlen ($path);
$root = substr ($uri, 0, $len - $len2);
$root = 'http://'.$host.$root;
?>
<script type="text/javascript">
top.location.href = "<?php echo $root; ?>";
</script>
Please Log in or Create an account to join the conversation.