500 Error on reload Joomla Login

johnoathome 16 Jun, 2015
Hi,

I have a multipage form that includes login and registration pages and several event switchers.

If the user is not logged in, they are asked if they have an account yet. If yes, they get a login form, if no, they get a registration form. This all works fine.

Once a user registers, they are sent a random password and a login page is loaded. This also works well on success.

However if I put an event loop in the Joomla Login "on fail" event that calls the login page again, I get a javascript popup with a 500 error, after which the page successfully loads.

So the event looks like this:

event postRegLogin
Joomla Login
Success: render next page (works)
Fail: Load postRegLogin (500 error popup then reloads the login page)

If I use the standard load event on fail I don't get an error, but of course it loads the first page of the form which isn't much good.

I can't seem to get this to work without an error. Am I missing something?

Thanks
John
GreyHead 17 Jun, 2015
Hi John,

I've no idea what is giving you the 500 Error - do the server logs give a clue? Maybe there is a loop in there somewhere?

You could try using a ReDirect back to the Log in event instead of an Event Loop - that might work?

Bob
johnoathome 17 Jun, 2015
Hi Bob,

Good thinking. For posterity, Apache logs the following error:

[Wed Jun 17 22:00:55.671623 2015] [:error] [pid 26624] [client 192.168.1.205:49747] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65552 bytes) in /var/www/domain_name/libraries/joomla/filter/input.php on line 699, referer: https://domain_name/appointment-scheduler?chronoform=AppointmentScheduler&event=doReg

So I doubled the memory for scripts and then Apache logs this:

[Wed Jun 17 22:13:23.981062 2015] [core:notice] [pid 28283] AH00052: child pid 28290 exit signal Segmentation fault (11)
[Wed Jun 17 22:13:45.003823 2015] [core:notice] [pid 28283] AH00052: child pid 28331 exit signal Segmentation fault (11)

At any rate, I've fixed it. The way it was setup, the Joomla login fail event is attempting to reload an event that contains an event switcher. This seems to create a loop and just doesn't work. I set up a separate event to reload the login page and pointed the fail event at that and the loop is gone.

Cheers
John
This topic is locked and no more replies can be posted.