Browse List of Users Error

Browse List of Users Error

by David Colucci -
Number of replies: 9

Hi All:

Recently upgraded to 2.2 and started getting this error.  For sake of troubleshooting, I Turned Debuggin and Error Messages to detail on...

Getting the following error on the screen when clicking on

"Browse List of Users":

 

Notice: Undefined property: stdClass::$showuseridentity in C:\Web\moodle\lib\moodlelib.php on line 3359 Notice: Undefined property: stdClass::$showuseridentity in C:\Web\moodle\lib\moodlelib.php on line 3363

Coding error detected, it must be fixed by a programmer: Invalid string identifier. Most probably some illegal character is part of the string identifier. Please fix your get_string() call and string definition

More information about this error

Stack trace:
  • line 6869 of \lib\moodlelib.php: coding_exception thrown
  • line 3421 of \lib\moodlelib.php: call to get_string()
  • line 126 of \admin\user.php: call to get_user_field_name()

 

Can't really find anyone who is also experiencing the error.  I'm a newbie, so please treat me with moron gloves.  Peace.  -Vertifly

Average of ratings: -
In reply to David Colucci

Re: Browse List of Users Error

by Jeffrey Jones -

Interesting...I've found this error as well. I've just run the upgrade from 1.9.17+ to 2.2.3, and, as you say, browsing users through the Adminstration/Users option throws the error. I do not get the error if I browse to the user through course "participants" lists.

In order to get our upgrade to run, I changed all data collations to unicode (many were still general). I have no way of knowing if that contributed...

In reply to David Colucci

Re: Browse List of Users Error

by Jeffrey Jones -

OK, I'll add my debug message:

Coding error detected, it must be fixed by a programmer: Invalid string identifier. Most probably some illegal character is part of the string identifier. Please fix your get_string() call and string definition

More information about this error

Stack trace:
  • line 6955 of \lib\moodlelib.php: coding_exception thrown
  • line 243 of \user\profile.php: call to get_string()

Windows Server 2008 R2/SP1, IIS 7.5, Moodle 2.2.3 (upgraded from 1.9.18+), PHP/MySQL all current.

This is irritating, and we're hoping against hope that we dont' have to run the upgrade again (we can fix it from here), 'cause it takes days.

In reply to Jeffrey Jones

Re: Browse List of Users Error

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Jeffrey and David,

Maybe in your list of users you have some names with "weird", non-ASCII characters?

Joseph

In reply to Joseph Rézeau

Re: Browse List of Users Error

by Jeffrey Jones -

That certainly occurred to me. As I mentioned in another post (http://moodle.org/mod/forum/discuss.php?d=203896), the things that seem to lead away from that are...

  1. I get the error only when looking at a profile through "Administration." Examining a profile through a "Participant" list in a course gives no such error.
  2. The user list generates just fine. I've found no user, so far, that doesn't throw the error when clicked to open the individual profile, so they all seem to have it.

That would imply that it's code, or data common to them all. We do use email addresses for our usernames, which are pretty long. Don't know about David...

In reply to Joseph Rézeau

Re: Browse List of Users Error

by Jeffrey Jones -

OK, I decided to actuallly make good on the claim that I'd tried a bunch of profiles. I've found a few that don't throw the error...

  • Allena Gobans, with username Allena.Gobans@stu.fayette.kyschools.us does (I changed the name 'cause this is a student account, could be a minor).
  • Aggie Sullivan, with username aggie.sullinger@fayette.kyschools.us doesn't

Maybe it's username length?

And, additionally, the "Edit" screen is still available, so it's only profile display that's affected. I can successfully edit the profile -- saving it doesn't throw an error.

In reply to Jeffrey Jones

Re: Browse List of Users Error

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Jeffrey,

I've had a closer look at your error message and <moodle>user/profile.php line 243 reads:

print_row(get_string('country') . ':', get_string($user->country, 'countries'));

So it seems that the error comes from your users' country name. Please tell us what country name(s) you are using for your users.

Joseph

PS.- I note that the stack trace you get for your error message is different from the stack trace of the original poster.

In reply to Joseph Rézeau

Re: Browse List of Users Error

by Jeffrey Jones -

Joseph:
       Good eye. I do hope this discussion helps Dave, even though the point of breakage is different.
       I'd shunted the research on this over to a high school student helping this summer, and he nailed it down too. We're using LDAP into MS AD for login, and city/country is not a part of the incoming data at first login/account creation. Hence we have massive numbers of accounts with that data missing.
       1.9 would display the account anyway, but not 2.2.
       We can query the database and fill in all the empty stuff, and our problem goes away...for the current crop of registered users. It will return for any new enrollee (we're a district of almost 40,000 users, so lots of new accounts coming in each year). So my questions are...

  • Do I start a bug tracker on this? My feeling is that the install should NOT break at the front end when it finds incomplete data (the way 1.9 worked).
  • How can I set defaults for these values as folks LDAP in for the first time, and their account is created? They will always be from this city in the US, since that's where the network lives...

Thanks. I'm so very grateful that this proved to be minor!

Average of ratings: Useful (1)
In reply to Jeffrey Jones

Re: Browse List of Users Error

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Jeffrey,

Glad I could help. I am not a database nor LDAP specialist. You can either view this as a bug in 1.9, which should not accept incomplete student data or, as you say, Moodle 2 should accept the country field to be empty when upgrading from 1.9 to 2. So I do not know how to advise, but there's no harm starting a bug tracker, it may help others.

ATB

Joseph

In reply to Joseph Rézeau

Re: Browse List of Users Error

by M Adil Mazhar -

Hi, I'm a newbie and getting the same error but some where else.

Actually I created a new page within question bank and all of what i developed is working fine to me at my localhost (moodle 2.5) but when i tried to run the same code at another moodle (moodle. 2.5.1), it gave me the error!!

As it's working fine in moodle 2.5 so should i consider it a version upgradation issue rather than the coding issue?