Upgrade to 1.8.3+ -->no user photos

Upgrade to 1.8.3+ -->no user photos

by Jay Melton -
Number of replies: 18
Hello:

I just upgraded from 1.8.2+ to 1.8.3+ and most of my students' (and mine) pictures are back to the smiley face.

I checked through the moodledata folder, and the photos are still there; they are just not showing up in the Participants or Profile pages.

Any suggestions?

Jay
Average of ratings: -
In reply to Jay Melton

Re: Upgrade to 1.8.3+ -->no user photos

by Oswald Zangerle -
Hi Jay,

I have got the same problem. I think it´s because of a change in the file user/pix.php. To solve this problem I have changed in the new file $pathname = make_user_directory($userid, true) . "/$image";
to $pathname = $CFG->dataroot.'/users/'.$userid.'/'.$image;
I don´t know if this is advisable it seems to work though.

Oswald
In reply to Oswald Zangerle

Re: Upgrade to 1.8.3+ -->no user photos

by Miroslav Fikar -
The same here. Thanks for the patch.
In reply to Miroslav Fikar

Re: Upgrade to 1.8.3+ -->no user photos

by Oswald Zangerle -
The lib/db/upgrade.php and the /version.php have been upgraded now. I put in the originally user/ pix.php v 1.16.2.1 2007-10-11 before executing the upgrade and all works fine now.
I don´t know it for sure but I believe that it´s important to do it in this order for the upgrade.php to copy the folders from "moodledata/users" to "moodledata/user/0".


In reply to Oswald Zangerle

Re: Upgrade to 1.8.3+ -->no user photos

by Andrea Bicciolo -
The transfer of profile images from "moodledata/user" to "moodledata/user/xx" should happen automatically upon upgrade, but the process is somewhat buggy. MDL-8605 is still open.

Coping manually the profile images helps to solve the issue. Please remember to assign correct ownership to copied files.
In reply to Oswald Zangerle

Re: Upgrade to 1.8.3+ -->no user photos

by Jay Melton -
Hi Oswald,

Your fix worked. I added yesterday's build of 1.8.3+, and the photos are back. Thank you for working through that.

Jay
In reply to Oswald Zangerle

Re: Upgrade to 1.8.3+ -->no user photos

by Paul Nijbakker -

Hi all,

I am having a strange problem. I upgraded to 1.8.3+ and coped the user pic folders from moodledate/users to moodledata/user/0. Now part of the users have their userpics in their profile, but a large part (mostly students) do not. What is the cause of this erratic behaviour (why does it work for some and not for others?)

Rgrds,
Paul.

In reply to Paul Nijbakker

Re: Upgrade to 1.8.3+ -->no user photos

by Oswald Zangerle -
Hi,
my first guess would be there are no photos displayed at all;
I have had a similar experience - some photos were sticking in the browser cache even after deleting it.
I don´t think it necessary any more to copy the user pix folders manually since the upgrading of lib/db/upgrade.php

regards
Oswald
In reply to Paul Nijbakker

Re: Upgrade to 1.8.3+ -->no user photos

by Richard Enison -

PN,

I don't know what browser or operating system you are using on your own computer when you access your Moodle site (whether it is on the same computer or a server), but I use IE7 under Windows XP Pro, and when I have a missing image link in a web page in my browser, I get a little square with a red X in it. When I move my mouse onto that X, it shows me the URL of the image file it is trying to display (momentarily). If that is not good enough because the URL is too long and it is shown for too short a time, I can right click on it and select Properties from the pop-up menu. That will show me the URL and if you can do that, it should give you a hint as to what folder that picture needs to be copied to.

If your browser doesn't let you do any of that, you should be able to do a View Source and find it in the HTML file you get. It will be the HTML code of the whole page, so you will have to search for it. If you don't know how to do that, attach the HTML file to your next post and we'll see if we can figure it out. Give us a hint as to where on the page the missing picture is located, for example, some of the surrounding text.

RLE

In reply to Richard Enison

Re: Upgrade to 1.8.3+ -->no user photos

by chhivhorng ly -
Dear Richard,

I want to ask you, How to upgrade version Moodle? because I want space memory large but for Moodle that I use in the server Memory limite 128MB.
Can you tell How to increase the memory? how student need more than 128MB.
You know when I increase filesize make the system so slow, why?

kind regards,

In reply to chhivhorng ly

Re: Upgrade to 1.8.3+ -->no user photos

by Richard Enison -

CL,

  1. Have you tried changing memory_limit in php.ini? Changing it to -1 means there is no limit.
  2. To upgrade Moodle, see http://docs.moodle.org/en/Upgrading_Moodle. Also these forum posts might be of interest:
    http://moodle.org/mod/forum/discuss.php?d=65685#p296001
    http://moodle.org/mod/forum/discuss.php?d=56991#p259683
    http://moodle.org/mod/forum/discuss.php?d=56991#p260339
    http://moodle.org/mod/forum/discuss.php?d=56991#p273929
  3. I presume you mean the upload filesize. Exactly why increasing it would slow down the whole system I don't know. Might have to do with paging and virtual storage, but that's just a wild guess.
  4. Why do you want to increase memory?

RLE

In reply to Richard Enison

Re: Upgrade to 1.8.3+ -->no user photos

by chhivhorng ly -
Dear Richard,
I want to increase memory because my school need more space to put the course for students for over 200Mb.
So I think you can help me.


In reply to chhivhorng ly

Re: Upgrade to 1.8.3+ -->no user photos

by Richard Enison -

CL,

Well, that answers question #4. What about #1?

I don't know whether you have your own server or are using a web hosting service. If the latter, perhaps they are imposing a limit on memory usage. You might ask their tech support people about it.

Other than that, I'm not really an expert in this area. I've already given you what I know about it. And anyway, this branch of the discussion is off-topic.

RLE

In reply to Paul Nijbakker

Re: Upgrade to 1.8.3+ -->no user photos

by Paul Nijbakker -
Hi Oswald,

I had to copy the user pics, since it was not done automatically and at first nothing showed, then I copied the pics to moodledata/user/0 and some showed up.

I have now solved the rest: It appears that all user pic folders from 1 to 999 go into that moodledata/user/0 folder, folders 1000 to 1999 go into the folder moodledata/user/1000, folders 2000 to 2999 into moodledata/user/2000, etc. I now have my user pics back, phew! approve

Rgrds,
Paul.
In reply to Jay Melton

Re: Upgrade to 1.8.3+ -->no user photos

by Andrea Bicciolo -
Upgrading to 1.8.3+ in the moodledata folder all user's photos uploaded after the upgrade are stored in "moodeldata/user/0/xx" rather than "moodledata/users/xx".

This is intentional to overcome the maximum number of folder allowed inside another folder.
In reply to Andrea Bicciolo

Re: Upgrade to 1.8.3+ -->no user photos

by Oswald Zangerle -
Why, of course. But what about a fall back for existing pictures in the "moodledata/users/xx" folder? To we have to relocate the pictures manually?

regards
Oswald
In reply to Andrea Bicciolo

Re: Upgrade to 1.8.3+ -->no user photos

by Martin Kurz -
I upgraded to 1.8.3+, all user data is in moodledata/user/0/xx copied. But still the user pictures ar not displayed. I even can not upload a new picture.

I do not want to do something wrong, so, again, what can I do? The patch of Oswald is now not necessary anymore I think.

Or in other words: I have done the upgrade, I should not change the intentionally place of the user photos, as I understand. But what is the next step? Should I just wait for a next update?

Greetings, Martin
In reply to Jay Melton

Re: Upgrade to 1.8.3+ -->no user photos

by Carlos Alexandre Fonseca -
Picture of Plugin developers
I create a small script to convert to new photos directory structure, works on linux

1- edit the script change some variables
2-put the script on user data directory moodledata/users, and run it
3- rename the users directory to user