I upgraded a site running 4.7.5 to 5.3. Everything went OK but I no longer see user pictures or uploaded images.

I have enabled enabled user picture on both installations. First I got text "userid's picture" in place of the picture in the 5.3 installation. I fixed the path to the picture image file in the database. After that, the pictures simply disappeared completely. I don't even see the Only local images are allowed. tag in the HTML source.

Uploaded images are not showing either. I am not sure how to begin debugging that.

Comments

squiggy’s picture

Have you made sure that you copied over the folders with all your images back into the files directory after the upgrade? I don't know what the problem is if that's not it.

ww9rivers’s picture

That was my first suspect. But that was not the problem -- as I said, the <img> tag for user pictures doesn't even exist in the HTML source for blog entries, for example. It seems that the <img> tag is being generated when I knowingly have the user's picture URL wrong, which is the real strange part of this puzzle.

I guess I will dig into the code when I have a free moment.

jo1ene’s picture

D5 creates a .htaccess file in the /files directory. Sometimes the server will balk at this. Don't just delete it because it will be regenerated. Download it. Remove the code below the first line of text. Don't delete the first line. Reupload it.

Advanced Web Design

ww9rivers’s picture

I didn't think of that. But that's not it either.

I found the file with these lines:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

I tried both deleting the two "Options" and deleting the file. Made no difference.

Besides, it does not explain the missing <img> tag for the images.

ww9rivers’s picture

I am not sure what the exact cause of the problem is, but Firefox's "Page Info" gave me a hint.

I uploaded a new image, it displays fine using the "?q=system/files/new-img.jpg" path. Although the old image is in the same folder, a similar path shows nothing. In the page info, the new image is of type "image/jpeg", while the old image somehow is of type "text/html".

So I deleted the old image and re-uploaded it. Although it ends up in the same location, with the same file name, it now displays OK.

Seems that Drupal 5 somehow took the images from 4.7.7 as text -- I haven't had time to figure out where yet. The same is true with user pictures. As soon as I reloaded my picture, it starts to show up fine.