Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile Picture - Previously Reported #15076

Closed
2 tasks done
jmartins1 opened this issue Jul 11, 2024 · 7 comments
Closed
2 tasks done

Profile Picture - Previously Reported #15076

jmartins1 opened this issue Jul 11, 2024 · 7 comments

Comments

@jmartins1
Copy link

jmartins1 commented Jul 11, 2024

Debug mode

Describe the bug

Reported an issue earlier where the default profile picture was missing and a placeholder was shown instead. Previous issue below.

issue

Although the update added a default profile picture, an issue remains.

If an admin attached a picture to the user's profile and that picture was then removed/deleted but not replaced, SnipeIT will display a picture placeholder instead of defaulting back to the system default profile picture

Please note I manually removed the profile picture in the image below to illustrate the issue. I had to manually assign a profile picture to correct the issue.

Asset

Reproduction steps

  1. View an asset check out to page.

...

Expected behavior

A profile picture should always be available. Whether it be an admin assigned picture or a system default picture. It should never display a placeholder.

Screenshots

No response

Snipe-IT Version

7.0.9

Operating System

Server 2022

Web Server

WAMP

PHP Version

8.2.5

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

@snipe
Copy link
Owner

snipe commented Jul 19, 2024

If an admin attached a picture to the user's profile and that picture was then removed/deleted but not replaced

How are you removing that picture?

SnipeIT will display a picture placeholder instead of defaulting back to the system default profile picture

I'm not exactly sure what you mean by "a picture placeholder"

@snipe
Copy link
Owner

snipe commented Jul 19, 2024

I'm not able to reproduce this (if I'm understanding the issue correctly.) :(

@snipe
Copy link
Owner

snipe commented Jul 19, 2024

In testing this, I did find a potential issue where the default system image got deleted from the disk if you click on "delete avatar", which gets a little weird, since that file is currently tracked in git, so the actual delete causes a git change where it shows the file as deleted. That's not awesome, but it's sort of expected, since we have to track the default in git in order to make sure users have it by default.

@jmartins1
Copy link
Author

jmartins1 commented Jul 20, 2024 via email

@snipe
Copy link
Owner

snipe commented Jul 20, 2024

What I'm suggesting is that if a user had a picture assigned to them (something other than the default system image) and then it is no longer in the avatar directory. SnipeIT should revert the user's profile picture to the system default automatically.

It does do that, but if you first deleted the one that comes with Snipe-IT, it would actually delete that file off the disk, which could result in the broken image.

@jmartins1
Copy link
Author

jmartins1 commented Jul 20, 2024 via email

@snipe
Copy link
Owner

snipe commented Jul 20, 2024

This should be fixed on master now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants