e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 214 forks source link

General Avatar issues / Media Manager / user.php / deleting un-used avatars #178

Open pete-leese opened 11 years ago

pete-leese commented 11 years ago

Issue $1

After performing a 1.x > 2.x upgrade, avatars are moved to the new folder location, displaying in forum threads as they should be, however if I navigate to media manager - (e107_admin/image.php?mode=main&action=avatar) the following is happening:

Imported / Migrated avatars are displaying as "Not in use"

However for avatars that have been uploaded since upgrading do show "Image in use"

A nice touch would be to display the user name that the avatar is associated too.

Issue $2

Clicking "Delete all unused images" in media manager does not delete any avatars, deleting individual avatars do not work either. the following is noted in debug output as an example:

Warning: unlink(../e107_system/32c5ff9088/temp/avatars/0001.1186684346.jpg) [function.unlink]: No such file or directory, Line 1988 of D:\wamp\root\vr6\e107_admin\image.php

Issue $3

"blank avatar" image displayed on user.php profile page (but unsure if this should display uploaded avatar or "profile photograph")

pete-leese commented 11 years ago

There is a further issue I have noticed in usersettings.php

When a users avatar is migrated, it is not reflected in usersettings.php, the "default" avatar icon is displayed, however it looks like the path is incorrect

Example, if I right click > properties on the URL it displays as:

http://localhost:8080/vr6/thumb.php?src=e107_media/32c5ff9088/avatars/default/-upload-ap_15693_avatarwoody.jpg&w=100&h=0

If I manually change it to the correct path and file name, it displays correctly:

http://localhost:8080/vr6/thumb.php?src=e107_media/32c5ff9088/avatars/upload/ap_15693_avatarwoody.jpg&w=100&h=0

NOTE -UPLOAD- prefixed to file name and the path should be /upload/ and not /default/ for the migrated avatar.

The following output is also displayed.

Warning: getimagesize(e107_media/32c5ff9088/avatars/default/-upload-ap_15693_avatarwoody.jpg) [function.getimagesize]: failed to open stream: No such file or directory, Line 1147 of D:\wamp\root\vr6\e107_handlers\validator_class.php

It simply just looks to be looking at the incorrect path / filename, Cam should be aware of this, as he's fixed similar issues in the forum yesterday.

Moc commented 11 years ago

Related and possibly already mentioned:

Moc commented 11 years ago

The only issue I have left from the issues mentioned in my previous reply is the 'not in use' message in the media manager > avatars area. I think this is issue $1 in your original report.

@VR6Pete Can you check and see if the issues - that you mentioned in your posts - are still current using the latest Github files?

Moc commented 11 years ago

@VR6Pete Can you check and see if the issues - that you mentioned in your posts - are still current using the latest Github files?

Moc commented 11 years ago

@CaMer0n

Regarding: "The only issue I have left from the issues mentioned in my previous reply is the 'not in use' message in the media manager > avatars area. I think this is issue $1 in your original report."

Caused by the following: e107_admin/image.php line 2241

in_array(basename($image_name),$imageUsed)

$image_name = upload/ap_0000001_designer_avatar.png $imageUsed = -upload-ap_0000001_designer_avatar.png

Unsure where to fix it in the code.

willem010 commented 10 years ago

i don't know what the status on this issue is supposed to be, but i still notice

1) uploaded images not being displayed. even a freshly uploaded image, it does appear in the correct avatar/upload folder but is not being displayed_ (when i move it to the avatar/default folder it is displayed.. so probably just a path issue)

2) unable to delete avatars.

Moc commented 10 years ago

@willem010

1) Is this on the entire website or on a specific are (forum, chatbox?) 2) I think this is a permission issue again.... or possibly the files aren't moved/copied over properly after all.

Will do a test upgrade again later to test things out.

willem010 commented 10 years ago

whole site.. (except for admin section, the images do show up in the avatar part of media manager)

the files appear to be at the correct location (..../avatars/upload/)

gary231178 commented 9 years ago

Hi, when i try to delete avatars in media manager (Unused) i check the avatar, select delete checked, are you sure> yes ok.

Refresh and said avatar still remains undeleted.

How can i delete manually via ftp as i can no longer find location of stored files. e.g they are no longer in images/avatar folder.

Regards.

Gary

CaMer0n commented 8 years ago

@Moc Any thoughts on this? Should we close it?

Moc commented 8 years ago

I haven't done any upgrades lately but I guess my previous statement still remains: https://github.com/e107inc/e107/issues/178#issuecomment-20964708

Regarding: "The only issue I have left from the issues mentioned in my previous reply is the 'not in use' message in the media manager > avatars area. I think this is issue $1 in the original report."

Caused by the following: e107_admin/image.php line 2241

in_array(basename($image_name),$imageUsed)

Example: $image_name = upload/ap_0000001_designer_avatar.png $imageUsed = -upload-ap_0000001_designer_avatar.png