Jump to content
gebeer

Error on login with custom user template

Recommended Posts

Hello,

I have a site with users that have a custom user template setup on  PW 2.7.2 stable.

Custom user template is "member" and role for those users also "member".

The site has a frontend dashboard where users can edit their profile, events etc.

I can login with this user type to the backend fine and the permission settings are all working.

When I login to the frontend, I get this error: "Fatal error: Maximum function nesting level of '10000' reached, aborting! in .../wire/core/Wire.php on line 333";

I already raised the xdebug.max_nesting_level from 1000 to 10000. When I set it to 100000, the server disconnects.

I can see that the user gets logged in with $session->login($uname, $pass) before the error is thrown.

EDIT: When I reload the login page after the error shows with the now logged in user, I get this error: "Fatal error: Maximum function nesting level of '10000' reached, aborting! in /var/www/utgpw/wire/core/Fieldgroup.php on line 61"

But a $session->redirect($dashboard->url) seems to cause the error.

If I logon with a test user that has role "member" but the regular user template, I don't get the error and get redirected to the dashboard fine. All the code in my dashboard template is working.

Actually, the whole login and dashboard logic for the frontend is copied from another site where it has been working fine for over a year now.

So I guess the problem is related to how the custom user templates are handled in the core. My setup for the custom user template has also proven to work without issues in 2 other sites.

I have spent hours on debugging already and now I'm lost. Any ideas that point to the cause of this would be much appreciated.

Share this post


Link to post
Share on other sites

There's certainly something fishy going on. I've xdebug running with max nesting of 300 and never had a problem (the default 100 is to few) and I'm using custom user templates as well.

Share this post


Link to post
Share on other sites

Yeah, I never had to raise it above 200 before. When xdebugging the login template it seems like it is going in loops. Makes my head spin.

Meanwhile I found that even with the $session->redirect part commented out I get the error (see my EDIT in the OP) while reloading the login page. Then it ppoints to /wire/core/Fieldgroup.php on line 61.

EDIT: Now I commented everything out in the login template. When I load the page while the user is still logged in, I get the error again.

Share this post


Link to post
Share on other sites

Do you compare two objects in your code somewhere? That can lead to such error.

Share this post


Link to post
Share on other sites

@tpr

not that I'm aware of. There is nothing special going on after login. User stays on the login page and gets presented with a logout button.

In the meantime I made a fresh 2.7.2 stable install, added the custom user template/parent and role just as on the problem-site. I copied over the login logic to the new test install and can login fine.

So the problem must be somewhere within other code on that site. I spent hours on debugging and can't seem to find the reason.

In Xdebug panel I see that the site hangs for a while at line 61 of wire/core/Fieldgroup.php and then throws the fatal error. My Xdebug call stack is then filled with 10000 lines. Would it help if I made a pastebin with the xdebug call stack, could anyone see from that where the problem lies?

EDIT: my member user template has about 20 fields. I tried removing all but the required ones. But the error still persisted. So it is not related to the user fields either.

EDIT2:

Into the clean install of PW 2.7.2 I imported all fields/templates from the affected site. Created a testuser with the custom member template and can login fine.

Something seems screwed with the site that has the problem.

Before wasting more hours on debugging the problematic install, I will rather import the content to the new blank install that now has all fields/templates that I need.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Tyssen
      I have a client who is reporting that in the last couple of days they can no longer login to their site with their normal browser (Chrome). Using another browser or an incognito window works.
      I've tried logging into the site using the same login details in my usual browser (Firefox) and have had no problems.
      The site is a membership site and today other members are reporting the same problem.
      The site is running 3.0.148 and has the session handler DB and login throttle modules installed. It was recently upgraded to 3.x from 2.x. But no changes have been made to the site between the time when they were able to login OK and when the problem started happening.
    • By codevark
      The Minimal Site works fine, but if I try to login as admin, I have no idea what the credentials are.
      I did not do the "install" process myself. The OVA came with everything set up, but there's no mention of the PW admin credentials being set to some initial value.
      Wondering if anyone else has tried the Bitnami OVA and if there's a simple answer.
      --Pete
    • By neonwired
      I'm hoping someone has seen this before. There doesn't appear to be an issue with the user info.

       

    • By calago
      after the migration to version 3.0.145 our export templates all of a sudden dont work properly, 
      we have a functionality where we use a boiler template with a set of fields. for some reason since the upgrade when we select the export template to export it. it wont show any of the fields added after the migration, 

      as you can see the offer certificate remarks field has been added to the export, 
      but when we select it it wont come trough

×
×
  • Create New...