User profile information not displaying properly

User profile information not displaying properly

by Kate Rhodes -
Number of replies: 11

Hi there, I've updated a site to moodle 2.4...

I have created 3 user profiles that are required fields. They appear as a column but they are blank. None of the information is displayed. How do I ensure this gets displayed properly?  I know the information is being collected because when you browse the actual user, the information is dipslayed in their profile. 

 

Thanks!

Kate

p.s - I'm not a 'developer' type... just an average moodle user! LOL --- be gentle. smile

Average of ratings: -
In reply to Kate Rhodes

Re: User profile information not displaying properly

by Andrew Normore -

Let's start with turning on Debugging.

Log in as an admin, and go to site administration on the (usually) left hand side. 

You will see development, click it.

Finally you will see debugging. Click it.

 

 

When the page loads in, you will see NONE as the current type. Change it to DEVELOPER.

 

Reload the page that isn't working, and let's see what it says.

In reply to Andrew Normore

Re: User profile information not displaying properly

by Kate Rhodes -

Okay, did that.  So, I went to the grades for one of the courses and tried to export the grades as an excel document and it displayed these...

 What do you think?error messge

 

So I went through cPanel, found the grades/lib.php file and looked at line 2723, here's what it says:

  if (!empty($user->{$fieldname}) || is_numeric($user->{$fieldname})) {

In reply to Kate Rhodes

Re: User profile information not displaying properly

by Kate Rhodes -

Not getting any error messages when I just go to a page where I want the profile fields to display though... just empty columns....

empty

In reply to Kate Rhodes

Re: User profile information not displaying properly

by Andrew Normore -

Hrmmm. Let's see if I guess this correctly:

  • Your Moodle 2.3 site worked great!
  • Upgrading to Moodle 2.4 broke the report

So, likely what happend was your custom user profile fields were not converted in the upgrade, and probably deleted. 

You can check by going to the user profile fields settings, at        user/profile/index.php 

My guess is you'll see they are missing. Re-build them and see if that works. If they ARE there, it might be a bug with Moodle 2.4 and the report you're using. 

We're getting closer to the solution!

 

In reply to Andrew Normore

Re: User profile information not displaying properly

by Kate Rhodes -

Well, no. The extra profile fields never did show up in the reports... that's why I thought maybe upgrading would help.

I checked the user/profile/index.php but I don't see anything that says missing. What would I be looking for? I can see that it's referencing User Profile Fields and categories...

How do I rebuild them? If I delete them in the user profile field window, it warns me that I'm going to delete all the existing records for each profile field.

 

In reply to Kate Rhodes

Re: User profile information not displaying properly

by Andrew Normore -

Notice: Undefined Property: stdClass              This is fine, it's just a "notice".

For Your Information
When it says error, thats when you have found a problem.

What this is saying, is that $user->{$fieldname} hasn't yet been declared. To get rid of the notice, you would put

$user->{$fieldname} = ""; above line 2723. But don't worry about it. When I turn debugging on, I get hundreds of those.

 

In reply to Kate Rhodes

Re: User profile information not displaying properly

by Paul Cook -

Could be a script error are you on 1.9 we have done a lot of fixes due to MySql database errors and updates. pc

In reply to Paul Cook

Re: User profile information not displaying properly

by Kate Rhodes -

Hi Paul It's been upgraded to 2.4. It was originally a 1.9 when I first built the site....  maybe something didn't upgrade properly???

In reply to Kate Rhodes

User profile information not displaying properly

by Gyanendra Singha -

When ever i am clicking on view profile it is just giving me a blank page. Not showing any kind of error. I am using external database for user registration. Earlier after verification of email it was taking user to profile page but now it is showing blank page. Even administrator can't view his profile page.

 

http://giftians.com/moodle/user/profile.php?id=2

can any body suggest what might be error.

In reply to Gyanendra Singha

Re: User profile information not displaying properly

by Anne Krijger -

As Andrew suggests above;
turn on debugging and take it from there.

In reply to Kate Rhodes

Re: User profile information not displaying properly

by Hazem Said -

Hi,

I faced the same problem recently

Just to document the issue and solution

It was due to using capital letters in short name of User profile field

I found this

https://tracker.moodle.org/browse/MDL-41145


When I changed the short name of user profile field to be all in lowercase, the problem was resolved

Best regards
Hazem

Average of ratings: Useful (3)