Bug 90382 - Regression in LibO 4.3.6.1 on sending document by mail
Summary: Regression in LibO 4.3.6.1 on sending document by mail
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.3.6.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-31 22:45 UTC by bruno
Modified: 2015-12-28 15:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bruno 2015-03-31 22:45:57 UTC
Using an update of LibreOffice in Mageia 4 (going from 4.1.6.2, last working, to 4.3.6.1 - as well as some versions in betweenas 4.2.0.4) there is a regression on the feature to send an email from libreoffice by clicking on the appropriate button. I'm configured to send using thunderbird (with the -compose option) which used to work.

Now when clicking on the button, a thunderbird new mail opens but the To: field is loaded with // and no attachment is made.

While it's looking like the Bug https://bugs.documentfoundation.org/show_bug.cgi?id=75825 the solution mentioned in this BR https://bugs.documentfoundation.org/show_bug.cgi?id=75825#c13 doesn't work for me.

I opened first that bug in Mageia as https://bugs.mageia.org/show_bug.cgi?id=15340 but it was given to me the advise to report it here.
Comment 1 Stephan Bergmann 2015-04-01 10:03:05 UTC
What exactly do you mean with "I'm configured to send using thunderbird (with the -compose option)"?

Also see bug 75825 comment 8:  "Writer 'File - Send - Document as E-mail...' does create a mail with the document as attachment here (various LO versions, running on Fedora 20).  It spawns program/senddoc, passing --mailclient, --subject, and --attach arguments, I'd suggest to start debugging there."
Comment 2 Buovjaga 2015-04-09 17:13:35 UTC
Set to NEEDINFO per comment 1.
Change back to UNCONFIRMED after you have provided the information.

You should also test with 4.4.x to see, if the problem persists.
https://wiki.documentfoundation.org/Installing_in_parallel/Linux
Comment 3 bruno 2015-05-05 00:15:24 UTC
The bug is fixed if I use the modified version of the sendoc.sh script as reported here: https://gerrit.libreoffice.org/#/c/13786/1/shell/source/unix/misc/senddoc.sh
and if I add an additional patch as mentioned on https://bugs.documentfoundation.org/show_bug.cgi?id=75825#c14

(using basename of $client which can be a full pathname)
Comment 4 Stephan Bergmann 2015-05-05 07:32:13 UTC
Bruno, if you want to keep this open (and not close it as a duplicate of bug 75825), please help investigate the root cause:

(1)  What are the arguments that LO passes to senddoc.sh (i.e., why doesn't it specify a mail client properly)?  See my comment at <https://gerrit.libreoffice.org/#/c/13786/1>:

"'If the mailclient value has not been specified, ie under "Options: Internet - E-mail - E-mail program," E-mail program is empty.'

"My argument is that this should not normally happen on Linux.  If the user does not explicitly specify the "E-mail program" option, it should automatically obtain a value (on GNOME, using the exact same gconf value that you're using in your patch).

"That it happens on Debian/Ubuntu is due to the distro-specific patch applied there that Björn mentions.  Any fix for this distro-specific issue would need to address that patch, not upstream senddoc.sh."

(2)  Is your version of LO using that Debian-downstream sensible-mua thing?  Does the problem go away if you follow bug 75825 comment 11?  If yes, I'd suggest to consider this bug a Debian-downstream one and move it there.
Comment 5 bruno 2015-05-05 21:25:25 UTC
(In reply to Stephan Bergmann from comment #4)
> (1)  What are the arguments that LO passes to senddoc.sh (i.e., why doesn't
> it specify a mail client properly)?  See my comment at
> <https://gerrit.libreoffice.org/#/c/13786/1>:

Your patch indeed is fixing my issue, when I improved it. I added comments to that gerrit link.

In my case that user has:
$ gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1
/usr/bin/thunderbird

So I need to remove the full path name to have the compare working.

> "'If the mailclient value has not been specified, ie under "Options:
> Internet - E-mail - E-mail program," E-mail program is empty.'
> 
> "My argument is that this should not normally happen on Linux.  If the user
> does not explicitly specify the "E-mail program" option, it should
> automatically obtain a value (on GNOME, using the exact same gconf value
> that you're using in your patch).

In our case we use KDE, and thunderbird is configured in the KDE panel as default mail client using the line /usr/bin/thunderbird -compse ...
and there is no program specified manually in libreoffice options.
So we get an empty MAILER variable. and thus use your additional code, but as the full path name was given in the KDE config box, we need to remove it here.

> (2)  Is your version of LO using that Debian-downstream sensible-mua thing? 

No I'm using Mageia, which is unrelated to Debian.
Comment 6 Stephan Bergmann 2015-05-06 06:39:15 UTC
(In reply to bruno from comment #5)
> Your patch indeed is fixing my issue, when I improved it. I added comments
> to that gerrit link.

no idea what "your patch" is
 
> > "'If the mailclient value has not been specified, ie under "Options:
> > Internet - E-mail - E-mail program," E-mail program is empty.'
> > 
> > "My argument is that this should not normally happen on Linux.  If the user
> > does not explicitly specify the "E-mail program" option, it should
> > automatically obtain a value (on GNOME, using the exact same gconf value
> > that you're using in your patch).
> 
> In our case we use KDE, and thunderbird is configured in the KDE panel as
> default mail client using the line /usr/bin/thunderbird -compse ...
> and there is no program specified manually in libreoffice options.

Do you have the "KDE backend" libkdebe1lo.so installed as part of LO?  If not, that explains why LO's "E-mail program" option is not automatically filled in.  If yes, you need to debug into the

  if ( id == "ExternalMailer" ) {

branch of getValue() in shell/source/backends/kdebe/kdeaccess.cxx to find out why reading that value from KDE does not work for you in LO.

(So when you are on KDE, it is kind of structurally the wrong thing anyway to try and use GNOME's gconftool-2 to obtain a KDE setting's value.)
Comment 7 bruno 2015-05-07 00:13:01 UTC
(In reply to Stephan Bergmann from comment #6)
> (In reply to bruno from comment #5)
> > Your patch indeed is fixing my issue, when I improved it. I added comments
> > to that gerrit link.
> 
> no idea what "your patch" is

diff -up ./shell/source/unix/misc/senddoc.sh.bco ./shell/source/unix/misc/senddoc.sh
--- ./shell/source/unix/misc/senddoc.sh.bco        2015-05-05 22:43:57.641568680 +0200
+++ ./shell/source/unix/misc/senddoc.sh   2015-05-05 22:44:06.696568259 +0200
@@ -77,6 +77,13 @@
     shift
 fi
 
+if [ "$MAILER" = "" ]; then
+    client=`gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1` || ""
+    if [ "`basename $client`" = "thunderbird" ]; then
+        MAILER=$client
+    fi
+fi
+
 # autodetect mail client from executable name
 case `basename "$MAILER" | sed 's/-.*$//'` in

> > > "'If the mailclient value has not been specified, ie under "Options:
> > > Internet - E-mail - E-mail program," E-mail program is empty.'
> > > 
> > > "My argument is that this should not normally happen on Linux.  If the user
> > > does not explicitly specify the "E-mail program" option, it should
> > > automatically obtain a value (on GNOME, using the exact same gconf value
> > > that you're using in your patch).
> > 
> > In our case we use KDE, and thunderbird is configured in the KDE panel as
> > default mail client using the line /usr/bin/thunderbird -compse ...
> > and there is no program specified manually in libreoffice options.
> 
> Do you have the "KDE backend" libkdebe1lo.so installed as part of LO?  

That is not part of the libreoffice packages we have in our Mageia repository. (based on version 4.3.6 and 4.3.7 which are the latest stable for Mageia 4)

> If not, that explains why LO's "E-mail program" option is not automatically
> filled in.

Do you think we're missing a package here to support this ?

> (So when you are on KDE, it is kind of structurally the wrong thing anyway
> to try and use GNOME's gconftool-2 to obtain a KDE setting's value.)

Well, not my choice in fact, but that's what was called by senddoc so I debugged that. Now that I know we may miss one shared module, I'll also report on the mgeia side to see what we can do as well on our side.

Anyway I still think that the sciprt should be fix to handle full path names.
Comment 8 Stephan Bergmann 2015-05-07 07:38:27 UTC
(In reply to bruno from comment #7)
> (In reply to Stephan Bergmann from comment #6)
> > (In reply to bruno from comment #5)
> > > Your patch indeed is fixing my issue, when I improved it. I added comments
> > > to that gerrit link.
> > 
> > no idea what "your patch" is
> 
> diff -up ./shell/source/unix/misc/senddoc.sh.bco
> ./shell/source/unix/misc/senddoc.sh
> --- ./shell/source/unix/misc/senddoc.sh.bco        2015-05-05
> 22:43:57.641568680 +0200
> +++ ./shell/source/unix/misc/senddoc.sh   2015-05-05 22:44:06.696568259 +0200
> @@ -77,6 +77,13 @@
>      shift
>  fi
>  
> +if [ "$MAILER" = "" ]; then
> +    client=`gconftool-2 --get /desktop/gnome/url-handlers/mailto/command |
> cut -d ' ' -f 1` || ""
> +    if [ "`basename $client`" = "thunderbird" ]; then
> +        MAILER=$client
> +    fi
> +fi
> +
>  # autodetect mail client from executable name
>  case `basename "$MAILER" | sed 's/-.*$//'` in

Note that I have nothing to do with that patch, apart from saying that it is a wrong approach.

> > > > "'If the mailclient value has not been specified, ie under "Options:
> > > > Internet - E-mail - E-mail program," E-mail program is empty.'
> > > > 
> > > > "My argument is that this should not normally happen on Linux.  If the user
> > > > does not explicitly specify the "E-mail program" option, it should
> > > > automatically obtain a value (on GNOME, using the exact same gconf value
> > > > that you're using in your patch).
> > > 
> > > In our case we use KDE, and thunderbird is configured in the KDE panel as
> > > default mail client using the line /usr/bin/thunderbird -compse ...
> > > and there is no program specified manually in libreoffice options.
> > 
> > Do you have the "KDE backend" libkdebe1lo.so installed as part of LO?  
> 
> That is not part of the libreoffice packages we have in our Mageia
> repository. (based on version 4.3.6 and 4.3.7 which are the latest stable
> for Mageia 4)
> 
> > If not, that explains why LO's "E-mail program" option is not automatically
> > filled in.
> 
> Do you think we're missing a package here to support this ?

Yes, looks like a Mageia distro problem.  For KDE, they should make available the LO artefacts generated when configuring --with-kde in the LO build.

> > (So when you are on KDE, it is kind of structurally the wrong thing anyway
> > to try and use GNOME's gconftool-2 to obtain a KDE setting's value.)
> 
> Well, not my choice in fact, but that's what was called by senddoc so I
> debugged that. Now that I know we may miss one shared module, I'll also
> report on the mgeia side to see what we can do as well on our side.

Note that senddoc does not call gconftool-2.

> Anyway I still think that the sciprt should be fix to handle full path names.

I see nothing in the existing script that would need fixing?
Comment 9 tommy27 2015-05-17 07:16:21 UTC
@Bruno
is issue still present in LibO 4.4.3.2?
Comment 10 tommy27 2015-06-24 03:59:41 UTC
set status to NEEDINFO still waiting for reporter feedback
Comment 11 QA Administrators 2015-12-27 20:31:26 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INVALID
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
 
Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 12 bruno 2015-12-28 14:59:53 UTC
This seems to now be working fine with Mageia 5 and LO 4.4.6.3 so I close that BR.
Comment 13 Buovjaga 2015-12-28 15:21:26 UTC
Thanks, setting to WFM.