-
Notifications
You must be signed in to change notification settings - Fork 174
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
Broken image display for address book contacts in drop down menu #3078
Comments
Can confirm. No contact images displaying anywhere in Nextcloud web app. Not in dropdown, not in contacts app. |
In the contact app, the 404 errors are also present (seems like the app makes HTTP request for each and every contact to check if there is an image), but a placeholder image is displayed correctly. |
Well - generating dozens or hundreds of requests which end in 404 errors is not a good design. If the contact app wants to load an image for a contact, then this should either be the stored image or a generated placeholder similar to how it is done for users. But the way how this seems to be implemented at the moment is really not very good. Having many 404 errors also triggers alerts in the server monitoring and it is hard to see if there is a real problem with the server or just the odd behaviour of the contacts app. |
Same problem here. Even |
I also have this problem with contacts of federated servers. The avatar is trying to load from my local nextcloud installation instead of the federated installation: should be: |
Just tried something new: Found a contact without an image in the NC web interface. Added Image, which didn't display anywhere in contacts app or dropdown. Synched contact to phone and email client, where the image displays correctly. Lots of errors in this format as previously stated. |
I can confirm that this is a bug. I just spun up a fresh instance of NC with a SQLite DB, and any new contact has a broken image while users have the default avatars with their initials. While tracing the code, I actually think that this issue has to do with the core user libraries. The failure occurs here: I'm going to open an issue in the server repo referencing this. |
Thanks for that finding! With this information it should not be too hard to fix this. |
I submitted a PR to hopefully fix the issue. Until then, here is a very simple app that solves the problem temporarily: |
Thanks a lot! The patch app works fine here to mitigate the problem until the PR is merged and and update is published. |
Glad I could help! I thought the issue had to do with my highly-customized setup, and I spent hours digging into my personal code. It really didn't occur to me that it could be an issue with the core NC libraries. At least there was a simple workaround. |
@arnowelzel I pushed an update to my app. It was throwing errors on a foreach loop because I didn't think I needed to validate that an element is an array. It works without the update, but this will keep your logs quiet. |
Thanks for the update, works fine :-) |
Broken image problem now fixed with the patch, but contacts which have images in the vcard are still not displaying it. So in both contact app and the quick contact find box, top right, all you can see are the contact initials. |
Problem still persistent with new NC 25.0.2 |
The problem is, that the contact drop down menu does not load any avatar images from contacts at all. The patch app only make sure, that this will not result in 404 errors but instead at least placeholders will be used. For me this is ok, since the regular contact list itself works fine though. Drop down list with a search - the "AA" entry is a contact which has an image but it is not used in the drop down: Contacts app with the same contact - here the image is used: |
Hmm... I didn't realize that the app was supposed to grab custom avatars for those contacts who are stored in the address book (vCard/DAV contacts). That makes sense, though. I'll give that a look this week to hopefully update my patch and find the root cause in the NC code. |
Unfortunately the patch app breaks the user profile page in the latest NC version. Also see nunimbus/contacts_avatar_patch#1 Hopefully the original issue gets fixed so the "patch" is not needed any longer. |
Issue still present after update to Contacts 5.1 today. |
Correct and confirmed after update today. Inside the app, the pictures are shown - only the quicksearch does not display the pictures. |
Confirmed! |
Same problem here with Contacts 5.1 and NC 25.0.3 |
I haven't kept up - been busy with other stuff. Has anyone tried with NC 26 beta? I might try to look at it soon, but no promises. |
I don't know the issue/PR but I think this has been addressed recently. Could someone check? |
@ChristophWurst You're correct, this was fixed in nextcloud/server#36735. |
Describe the bug
I notized this issue after upgrading from Nextcloud 24 to Nextcloud 25, but maybe this also happens with Nextcloud 24:
When opening the contact menu, images for contacts who don't have an image show as "broken image" and not using the initials as placolder. In the following screenshot the "C" and "D" are users in Nextcloud. All other entries are just address book contacts without image
The reason for this is, that the respective image URLs (e.g. https://myserver.example/avatar/a5db8598-935c-4935-8ac7-02d89f1226e6/64&size=64) result in 404 errors.
Steps to reproduce
Expected behavior
Address book contacts without image show a placholder similar to user entries based on the first and last name.
Actual behavior
A "broken image" is displayed since the image URL responds with a 404 error.
Contact version
5.0.1
Operating system
Ubuntu Linux 20.04.5 LTS
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database
MariaDB
Additional info
No response
The text was updated successfully, but these errors were encountered: