-
Notifications
You must be signed in to change notification settings - Fork 81
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
1) Crash on error during photo cropping, 2) exported VCard contains broken PHOTO property #345
Comments
Hello, can you please share the long entries generated when opening the contact? Check the error log and the carddav log. |
I didn't find any carddav log but here are the generated log entries :
|
Thanks for the report. It's actually two issues you found there 👍
|
A fix is available in the issue345_crashOnPhotoCrop branch. It would be great if you could try. I will still have to extend the tests a bit before merging this back to master. |
Thank you for investigating into this. I believe I've understood the two issues you described. I'm not sure how to test your fix, I simply switched the carddav folder plugin with the new sources. Is this a good way? The app crashed immediately when I try to access the contacts panel with this error:
|
In principal yes, you can drop in the new sources into the plugin directory. Two things to consider though:
Concerning your error, I cannot match the line numbers with the corresponding code locations in the issue branch, so be sure to fetch the correct version. I also have no idea how the current code might end up in returning a bool instead of a string. https://github.com/mstilkerich/rcmcarddav/archive/refs/heads/issue345_crashOnPhotoCrop.zip And one more info concerning the fix: With your PHP, the cropping still won't work because it lacks support for JPEG processing. But instead of crashing it should now show the uncropped photo instead. |
Hm, sorry.. I believe I started to merge the two versions but stopped somewhere before having finished... Anyway I tried it again and it works fine ! The contacts panel takes some time to load completely, while issuing some php errors, but maybe it is because of my hazardous install. It looks like the carddav sync between RC and NC addressbook is not working anymore (but data is the same so... 🤷♂️) :
|
When exporting the contact, photo encoding fits in 15306 lines but maybe it is because crop info is not kept? |
I changed the export code a bit to be simpler. It now provides the card exactly as provided by the carddav server, except for PHOTO where an externally referenced PHOTO is stored inside the card (because the URI normally is not accessible without authentication, and thus limits interoperability of the exported card), and cropping the photo if needed (reduces size of the exported card, plus the cropping feature is not very widely supported outside the Apple ecosystem). I merged this back to master now. Concerning your error: The authentication is rejected by the server, like you have the wrong password stored. I don't know how this happened, maybe a side effect of your manual merge? Anyway, I would simply suggest to enter the password again in the settings panel and save the addressbook. Otherwise you will not get updates from the server anymore, and won't be able to change / add / delete cards. Thanks again for reporting this issue. |
I now use the latest release for production and it works great! |
Thanks for the feedback, happy to hear it works 👍 |
Bug description
Hi,
I am synchronizing an addressbook from Nextcloud where I have a contact with a photo.
Trying to access it through Roundcube Carddav interface results in a blank panel as in the photo.
Comparing the vcard from NC and RC gives :
As you can see the RC data fits in 2 lines, while for NC there are 15510 lines for data encoding...
Thank you!
Versions
Roundcube Webmail 1.4.11
carddav | v4.1.0
The text was updated successfully, but these errors were encountered: