Unsupported redirect detected, script execution terminated

Unsupported redirect detected, script execution terminated

by Chris Clark -
Number of replies: 2
Hi Everyone,

I have a global glossary inside a course on my moodle site (Moodle 2.6.6 (Build: 20141110)) which uses auto-linking throughout the rest of the site, however whenever  a user clicks on an auto-link they receive the following error: Unsupported redirect detected, script execution terminated.


I thought I had resolved this by enabling guest access on the course and that the cause of the error was simply to do with users not having access to the course and hence the glossary.


My testing of toggling guest access on and off did seem to provide the results I was after.


After further testing, it seems that after a user logs in they still receive the error message the first time they click on an auto-link.

Does anyone with more knowledge of the glossary plugin  have any insight?

Average of ratings: -
In reply to Chris Clark

Re: Unsupported redirect detected, script execution terminated

by Paula Clough -

Chris,

Which version of Moodle are you using?

You said, "After further testing, it seems that after a user logs in they still receive the error message the first time they click on an auto-link."  Does this mean that the second or third time they click on a link, they are able to get in?

The only time I have attempted to use a global glossary as you are suggesting, we actually put it on the front page of the Moodle site. After we know for sure which version of Moodle you are on, I may be able to play with it and see if I can replicate. Or perhaps someone else knows more about this than I do.

cool

In reply to Chris Clark

Re: Unsupported redirect detected, script execution terminated

by Jeff White -

Hi Chris,

I was having a similar issue with a global glossary that was added to the frontpage of my Moodle instance. 

You are probably seeing an error similar to this on your php logging: 

 Default exception handler: Unsupported redirect detected, script execution terminated Debug: \nError code: redirecterrordetected\n* line 2527 of /lib/weblib.php: moodle_exception thrown\n* line 3151 of /lib/moodlelib.php: call to redirect()\n* line 3249 of /lib/moodlelib.php: call to require_login()\n* line 29 of /mod/glossary/showentry_ajax.php: call to require_course_login()\n, referer: http://example/course/view.php?id=5 

To fix this I had to go to Site Administration --> Front page -->Front page settings --> change Default frontpage role from None to Guest or Student.

After that all the non administrators had rights to view the global glossary window throughout the site.