Closed Bug 1793323 Opened 2 years ago Closed 2 years ago

Passing document from LibreOffice to TB compose window not working in TB 102

Categories

(Thunderbird :: OS Integration, defect)

Thunderbird 102
defect

Tracking

(thunderbird_esr102+ fixed)

RESOLVED FIXED
107 Branch
Tracking Status
thunderbird_esr102 + fixed

People

(Reporter: b2, Assigned: mkmelin)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Steps to reproduce:

There are two ways to start a compose window from the command line:

thunderbird -compose "attachment='file:///home/xxxxx/Desktop/huhu.txt',subject=noname)"
thunderbird -remote "xfeDoCommand(composeMessage,attachment='file:///home/xxxxx/Desktop/huhu.txt',subject='noname')"

The second one is supported in this code:
https://searchfox.org/comm-central/rev/bfefc713c577d1b7db4e06f16bd687ccb7875ea7/mail/components/MessengerContentHandler.jsm#256
and appears to be the method at least some LibreOffice versions send documents via TB via a file in /tmp.

The second method doesn't work in TB 102 any more whereas it still worked in TB 91. It's also broken on Windows where it's likely not used since MAPI is used for sending documents from other applications.

-remote was likely overlooked in bug 1745814.

Blocks: tb102found
Keywords: regression
Status: UNCONFIRMED → NEW
Ever confirmed: true

I'd like to add that the two methods above seem to be used only when the user has configured a default email client within LO (see this comment). If none is configured (which is the default on a fresh installation), xdg-email or kde-open are used as a fallback.

On my Gnome 42 installation I have verified this behavior and found that xdg-email in turn calls the email app configured in Gnome settings as default email app, i.e. Thunderbird with an argument like this: mailto:test@mail.me?subject=hello&attach=/var/home/martin/blub.odt

Thunderbird then opens a compose window with subject and To address correctly set, but without the attachment.

I think most users do not specify their mail client explicitely in LO, so this is probably the bug that hits most users.

mailto: ... &attach=file doesn't work for security reasons, see bug 1309217. The command line switches that can add an attachment are -compose and -remote.

Looks good to me.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #9297415 - Flags: review+
Regressed by: 1745814
Target Milestone: --- → 107 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c561158b002c
fix command line -remote 'xfedocommand(composemessage, ...)'. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9297415 [details] [diff] [review]
1793323-cmd-line-remote.patch

[Approval Request Comment]
Regression caused by (bug #): bug 1745814?
User impact if declined: can't attach files from command line, breaks Send-to functionality in other software
Testing completed (on c-c, etc.): c-c, soon beta
Risk to taking this patch (and alternatives if risky): safe

Attachment #9297415 - Flags: approval-comm-esr102?

Comment on attachment 9297415 [details] [diff] [review]
1793323-cmd-line-remote.patch

[Triage Comment]
Approved for esr102

Attachment #9297415 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: