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

BUG: picture on member not shown #32447

Open
JonBendtsen opened this issue Dec 21, 2024 · 14 comments
Open

BUG: picture on member not shown #32447

JonBendtsen opened this issue Dec 21, 2024 · 14 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@JonBendtsen
Copy link
Contributor

Bug

When you upload a picture on a member there are indicators that there is a picture - but you can not see it.

You can also upload a picture on a Contact (of a Thirdparty) and here it does work.

Dolibarr Version

20.0.0 docker image

Environment PHP

8.2.7

Environment Database

MariaDB 11.5.2-MariaDB-ubu2404

Steps to reproduce the behavior and expected behavior

enable member and thirdparty module

Create member, thirdparty and contact.

Upload picture to a member - but you can not see it, which I expect would work because it works for contacts

Attached files

contact_with_picture
member_picture_does_not_work

@JonBendtsen JonBendtsen added the Bug This is a bug (something does not work as expected) label Dec 21, 2024
@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen i don't have this problem in v20 !

@JonBendtsen
Copy link
Contributor Author

@JonBendtsen i don't have this problem in v20 !

oh, that is particular. Are you also running 20.0.0? or one of the other versions?

How do we track down why we experience a difference?

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen i use 20.0.2 ( + last fixes in 20 branch)... try to upgrade to 20.0.2

@JonBendtsen
Copy link
Contributor Author

Hey @hregis the bug persists even with v20.0.2 docker image. How can we track down other differences between your and my installation?

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen what is the image format ? (png, jpg)
and if you click to show preview ?

@JonBendtsen
Copy link
Contributor Author

@JonBendtsen what is the image format ? (png, jpg) and if you click to show preview ?

@hregis the picture is jpeg and I use the same file for my thirdparty contact where it does work that I do for my member

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen i don't have this problem even in 20.0.0 !

@JonBendtsen
Copy link
Contributor Author

@hregis if I click on the picture on the member my browser indicates that there is a link, but nothing pops up.

Where as if I do the same on my Thirdparty Contact, then it does pop up

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen and what is this link?

@JonBendtsen
Copy link
Contributor Author

@hregis

root@dolipod:/var/www/documents# find . -type f -iname jon_for_gravatar.jpg
./adherent/MEM2412-0287/photos/jon_for_gravatar.jpg
./societe/contact/1749/photos/jon_for_gravatar.jpg

if I right click and get the link to the preview then the only difference between the 2 lines are:

%3Dcontact	   |	%3Dmemberphoto
%3D1749		   |	%3DMEM2412-0287

@JonBendtsen
Copy link
Contributor Author

for both links I did this:

cat contact.line.txt | sed -e "s/%/§%/g" | tr "§ " "\n"  > contact.txt

because then I can use a simple diff between those 2 files contact.txt and member.txt and it will show me the words/segments that are different

@JonBendtsen
Copy link
Contributor Author

next thing could be to check if the javascript:document_preview() function are different on the 2 pages

@JonBendtsen
Copy link
Contributor Author

I saved the pages and expect for the nonce, the links are identical

JonSweet16:tmp jonbendtsen$ grep -i 'script' contact.html | grep -i "lib" | cut -d":" -f2- | sed -e "s/nonce.*src/src/" > contact.js
JonSweet16:tmp jonbendtsen$ grep -i 'script' member.html | grep -i "lib" | cut -d":" -f2- | sed -e "s/nonce.*src/src/" > member.js
JonSweet16:tmp jonbendtsen$ diff -W200 -y contact.js member.js

@hregis
Copy link
Contributor

hregis commented Dec 22, 2024

@JonBendtsen and in browser console ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

2 participants