1
goffy
bug in admin/userhandling
  • 2016/6/23 14:10

  • goffy

  • Just can't stay away

  • Posts: 542

  • Since: 2010/12/27


Hi

xoops 2.5.8
php7

following situation:
1) you register a new user on user site
2) go later to admin area and edit this user
--> everything is fine

1) you create a new user in modules/system/admin.php?fct=users
2) go later to admin area and edit this user
Error: Call to a member function getVar() on null

the reason for that is, that the necessary profile_id in table profile_profile is not created/added, if you create the user via modules/system/admin.php?fct=users&op=users_add

2
Mamba
Re: bug in admin/userhandling
  • 2016/6/23 14:35

  • Mamba

  • Moderator

  • Posts: 11391

  • Since: 2004/4/23


On my local WAMPServer with PHP 7.08 I couldn't replicate it.

Has anybody else experienced something similar?
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
zyspec
Re: bug in admin/userhandling
  • 2016/6/23 15:20

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


goffy,

I suspect this is a profile module bug. I quickly tried to duplicate the error you describe but everything worked ok although I didn't have the Profile module enabled.

Can you give us the "exact" error that happened - include the actual error message. The error message will usually give a file name and line number which helps us narrow down the problem more easily.

4
goffy
Re: bug in admin/userhandling
  • 2016/6/23 16:41

  • goffy

  • Just can't stay away

  • Posts: 542

  • Since: 2010/12/27


@zyspec

yes, it is a problem of module profile (but initiate by system user handling), and you didn't get the error, if you haven't enabled module profile.

again the steps:
1) you create a new user in modules/system/admin.php?fct=users
2) goto admin area modules/profile/admin/user.php and try to edit this user
then I get internal server error:
ErrorErrorCall to a member function getVar() on null


The error raise at line 472 of module/profile/include/forms.php, because the user_id of the user should be also the profile_id in table profile_profile. If I add the user_id to this table, all is working.

5
zyspec
Re: bug in admin/userhandling
  • 2016/6/23 17:24

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


@goffy

You're right. This appears to be a bug. Hopefully @mamba or @geekwright has time to look into it - definitely should be reviewed in XOOPS 2.6. It's a problem with the way the Profile module tries to hook into the preloads for user editing. The Profile module tries to jump into the middle of the editing sequence and redirect to a different page. The problem is this only works when the preload event is triggered - which it isn't when editing/creating the user from the Admin side.

Unfortunately I don't see a "quick and dirty" work-around to fix it other than triggering the same preload event in more than one place - which could turn into an ugly hack pretty quickly.

6
Mamba
Re: bug in admin/userhandling
  • 2016/6/23 20:57

  • Mamba

  • Moderator

  • Posts: 11391

  • Since: 2004/4/23


Did you have the issue before or after you've made the changes?
https://github.com/XOOPS/XoopsCore25/pull/133

Or is it the same?

EDIT: I was able to reproduce it....
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

7
geekwright
Re: bug in admin/userhandling

Good catch @goffy!

Seems like we should have a "new user created" event triggered when a user is added. That way, profile could listen for that and add its extras as needed. I'll give that some thought.

Thanks!

8
geekwright
Re: bug in admin/userhandling

Fix on the way in https://github.com/XOOPS/XoopsCore25/pull/169

Thanks again for the report!

Login

Who's Online

492 user(s) are online (169 user(s) are browsing Support Forums)


Members: 0


Guests: 492


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits