Download it now!
Bug 43277 - Send Legacy Report "E-Mail as ...": error message instead of opening e-mail client
Summary: Send Legacy Report "E-Mail as ...": error message instead of opening e-mail c...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: BSA target:4.4.0 target:4.3.0.2 targe...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2011-11-27 08:51 UTC by Tony Pursell
Modified: 2014-08-09 12:49 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen Shot showing the error message. (217.18 KB, image/png)
2011-11-27 08:51 UTC, Tony Pursell
Details
bt (4.75 KB, text/plain)
2014-06-28 22:57 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Pursell 2011-11-27 08:51:24 UTC
Created attachment 53886 [details]
Screen Shot showing the error message.

Problem description: 

If you open a report in Base and try to use File > Send > E-Mail as PDF... the result is an error message (see attached screen shot).  This is the same for all the File > Send > E-Mail as... options.  

There is no problem with File > Send > Document as E-Mail, which will attach an odt version of the report to an email using my default mailer (Evolution).  

Expected behavior is found in Writer where all the File > Send > E-Mail as... options work correctly.

This problem was originally reported in OpenOffice.org version 3.0 for Ubuntu 9.04 (see https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/433563) and is still present in LibreOffice 3.4.4 and Ubuntu 11.10. It was also know to exist in OpenOffice 3.1.1 for Windows XP.
Comment 1 Julien Nabet 2011-12-02 22:56:12 UTC
I confirm this with 3.4.4 on Debian testing. x86-32
I tested by letting Evolution by default (sensible-ooomua in options of Base).
Send Email works but not Send Email as PDF whereas it works well on Writer.
No error messages in console, no exception throwed in gdb during the test of sending.
Comment 2 Julien Nabet 2012-03-24 01:24:59 UTC
On pc Debian x86-64, with 3.5 branch, I didn't reproduce this behaviour.
I selected "E-Mail as PDF" and it launched Icedove.
The weird thing is I expected it to try to launch Evolution since Iceweasel tries to open mailto link with Evolution.

Anyway, do you reproduce this behaviour with 3.5.1 ? (could you use a brand LO profile if possible)
Comment 3 Mark Stanton 2012-04-03 12:27:41 UTC
On Fedora 16 x86_64 with LO 3.5.3rc0+ I don't get this behaviour either.

Initially I hadn't got Evolution configured as mail client, so Base complained.  On configuring it it still didn't load Evolution, but it did send the email, with attachment.

?
Comment 4 Mark Stanton 2012-04-03 12:36:25 UTC
>  On configuring it it still didn't load Evolution, 

Hmm, perhaps I'm expecting the wrong thing.  It *did* open a message dialogue which I used to send the email.  It didn't say "Evolution" on it, but on closer inspection that is what it is.
Comment 5 Tony Pursell 2012-04-04 10:08:57 UTC
Apologies to all for having not made any further comment on this bug after posting it.  That is primarily due to it being an upstream bug report for a bug in Launchpad for Ubuntu.  See  https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/433563 where I have made more comments.

What I would like to point out is that it has nothing to do with the mail client (Evolution, Thunderbird, or whatever).  See my comments in the above link.

As far as knowing whether this bug is fixed in any further release, I did download and install LO dev 3.5 for Ububtu, and it was still there.  I have also installed Beta 2 of Ubuntu 12.04 (which has LO version 3.5.1.2) on a USB stick and have found the bug in that version.  I will now wait for the final version of Ubuntu 12.04 at the end of this month and retest.
Comment 6 Julien Nabet 2012-04-16 11:24:53 UTC
(In reply to comment #5)
...
> As far as knowing whether this bug is fixed in any further release, I did
> download and install LO dev 3.5 for Ububtu, and it was still there.  I have
> also installed Beta 2 of Ubuntu 12.04 (which has LO version 3.5.1.2) on a USB
> stick and have found the bug in that version.  I will now wait for the final
> version of Ubuntu 12.04 at the end of this month and retest.

Could you try 3.5.2 final with a brand new LO profile ?
Comment 7 Jochen 2012-07-27 15:25:33 UTC
Hi Tony,

please give an update: using new components (Ubuntu and LO 3.5..5) bug still exists?
Comment 8 Tony Pursell 2012-07-27 17:16:20 UTC
I have tested LO version 3.5.4.2 (350m1(Build:2)) which is the version in Ubuntu 12.04 and there is no change. 

File > Send > E-Mail as PDF... still gives the same error message for a Base Report but works OK for a Writer document.

I did this test both in a Guest session (with a new database and report created) and as my normal user with a new profile ~/.config/libreoffice (using the existing test database and report).
Comment 9 Lionel Elie Mamane 2012-07-30 09:36:54 UTC
Tested on Debian GNU/Linux amd64, LibreOffice 3.5.5.3 .deb packages downloaded from www.libreoffice.org (not the ones provided by Debian).

1) Menu Tools / Options / Internet / E-mail

2) Enter /usr/bin/mutt for field "E-mail program"

3) Click on "OK"

4) Send as PDF from a Base report works
Comment 10 Lionel Elie Mamane 2012-07-30 09:41:44 UTC
Tested with LibreOffice 3.4.6 (package provided by Debian). "Send / E-mail as PDF" works with /usr/bin/mutt
Comment 11 Lionel Elie Mamane 2012-07-30 09:53:47 UTC
I originally had "sensible-ooomuas" as E-mail application set in LibreOffice; this looks like a Debian extension (which Ubuntu inherited). With this, I get same error message as original reporter.

Two problems there:

1) Internet search suggests the right historical setting is "sensible-ooomua" without final "s".

2) There is no "sensible-ooomua" on my system. Maybe it got lost in the migration from OO.org to LibreOffice? I have Debian package libreoffice-common version 1:3.4.6-2.

Anyway, assuming this is a Debian/Ubuntu-specific bug and closing here.

If you get this bug with Tools / Options / Internet / E-Mail / E-mail program set to something sensible other than "sensible-ooomua" and/or "sensible-lomua", reopen this bug.
Comment 12 Lionel Elie Mamane 2012-07-30 10:03:20 UTC
(In reply to comment #11)
> I originally had "sensible-ooomuas" as E-mail application set in LibreOffice;
> this looks like a Debian extension (which Ubuntu inherited). With this, I get
> same error message as original reporter.
> 
> Two problems there:
> 
> 1) Internet search suggests the right historical setting is "sensible-ooomua"
> without final "s".
> 
> 2) There is no "sensible-ooomua" on my system. Maybe it got lost in the
> migration from OO.org to LibreOffice? I have Debian package libreoffice-common
> version 1:3.4.6-2.

Actually, if I set it to "sensible-ooomua", it launches evolution.
Comment 13 Tony Pursell 2012-07-30 14:02:58 UTC
I have tested LO version 3.5.4.2 (350m1(Build:2)) which is the version in Ubuntu 12.04.

I have set Tools / Options / Internet / E-Mail / E-mail program to all of the following: "sensible-ooomua", "sensible-lomua", "/usr/bin/mutt" and "/usr/bin/evolution" and there is NO CHANGE.

File > Send > E-Mail as PDF... still gives the same error message for a Base Report, but works OK for a Writer document.

(The only thing that does not work for me is /usr/bin/mutt, which gives an error in the terminal because I do not have that program).

Please note that this bug is all about the difference between a Base Report and a Writer Document. It is not saying that File > Send > E-Mail as PDF... does not work per se. It is saying that it does not work for a Base Report.

I am reopening this bug.
Comment 14 Lionel Elie Mamane 2012-07-30 16:03:38 UTC
Reproduced in my libreoffice-3-5 dev tree with *legacy* report, not report builder report.
Comment 15 Lionel Elie Mamane 2012-07-30 17:24:39 UTC
Traced the calls; the difference is in SfxMailModel::SaveDocumentAsFormat in file sfx2/source/dialog/mailmodel.cxx

Interesting things happen around line 419:

In the working case (Report Builder report), aQuery looks like:


uno::Sequence of length 3 = {{
    Name = "Type", 
    Value = uno::Any "pdf_Portable_Document_Format"
  }, {
    Name = "DocumentService", 
    Value = uno::Any "com.sun.star.text.TextDocument"
  }, {
    Name = "Flags", 
    Value = uno::Any 524354
  }}

and then xEnumeration->hasMoreElements() is true and aFilterName is set.

In the not working case (legacy report), aQuery looks like:


uno::Sequence of length 3 = {{
    Name = "Type", 
    Value = uno::Any "pdf_Portable_Document_Format"
  }, {
    Name = "DocumentService", 
    Value = uno::Any "com.sun.star.sdb.TextReportDesign"
  }, {
    Name = "Flags", 
    Value = uno::Any 524354
  }}


and xEnumeration->hasMoreElements() is false, and aFilterName is not set. Thus on line 485, the procedure aborts because "aFilterName.getLength() == 0".

Now we need to find someone that understands this filter lookup stuff...
Comment 16 Lionel Elie Mamane 2012-07-30 17:27:53 UTC
Reproduction instructions for people not familiar with LibreOffice Base: download attachment 63667 [details]. Open in LibreOffice. Click on "Reports", double-click on "City Filter". It asks for parameter "Cidade", enter "London" (without the quotes), click OK.

Menu File / Send / E-mail as PDF
Comment 17 Lionel Elie Mamane 2012-07-30 17:31:14 UTC
work-around:

1) menu File / Save Copy as
2) save into some temporary file
3) open said temporary file
4) send as PDF
5) delete temporary file
Comment 18 Rainer Bielefeld Retired 2012-07-31 06:49:46 UTC
[Reproducible] with Server Installation of  "LibreOffice 3.6.0.4 rc  English UI/ German Locale [Build-ID:  932b512] on German WIN7 Home Premium (64bit) and attachment 63667 [details]

Proceeding due to Comment 16: Menu 'File -> Send -> As PDF' shows up error message "An error occurred in sending the message. Possible errors could be a missing user account or a defective setup. Please Check the LibreOffice settings or your e-mail program settings."

So indeed "OS=ALL"

Problem is not PDF-related, all "'Send -> E-Mail as ...' is broken
Comment 19 Thomas Hackert 2012-09-02 11:27:27 UTC
Hello Tony, *,
I can confirm this bug with LO Version 3.6.1.2 (Build ID: e29a214) and installed Germanophone UI/help under Debian Testing AMD64 ... :( I am using mutt 1.5.21, but does not be the culprit, as I am able to send documents from within Writer and/or Calc ... ;)

HTH
Thomas.
Comment 20 Julien Nabet 2014-06-28 22:57:02 UTC
Created attachment 101944 [details]
bt

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I noticed that if I change
    933         else if ( !xReportDefinition.is() )
    934             xModule->setIdentifier( "com.sun.star.sdb.TextReportDesign" );
by
    933         else if ( !xReportDefinition.is() )
    934             xModule->setIdentifier( "com.sun.star.text.TextDocument" );
it worked
(see http://opengrok.libreoffice.org/xref/core/dbaccess/source/core/dataaccess/documentdefinition.cxx#934), of course it was just to test

Now, after other investigation, I think the filter doesn't work with "com.sun.star.sdb.TextReportDesign" because there's no fragment about it here:
filter/source/config/fragments/filters

Opengroking TextReportDesign gives few results, see http://opengrok.libreoffice.org/search?q=TextReportDesign&project=core&defs=&refs=&path=&hist=
I wonder if it could be removed and replaced by com.sun.star.text.TextDocument or if a filter fragment should be added.
Comment 21 Julien Nabet 2014-06-28 23:09:42 UTC
I confirm send File > Send > Email as PDF works after having created writer_report_pdf_Export.xcu in filter/source/config/fragments/filters by putting + "make filters && make postprocess" + brand new profile

Should I keep on this way for other cases?
Comment 22 Julien Nabet 2014-06-30 21:28:04 UTC
I didn't succeed with other cases by using fragments but replacing "com.sun.star.sdb.TextReportDesign" by "com.sun.star.text.TextDocument" makes the 3 sendings ok (ODT, Windows, PDF).
Comment 23 Commit Notification 2014-06-30 21:29:58 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=501ebd0f7c867c4df5ba84fd8b6b1a197aeeea92

Resolves fdo#43277  Send Legacy Report "E-Mail as ..."=>error message



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 Julien Nabet 2014-06-30 21:37:10 UTC
Gerrit review:
4.3: https://gerrit.libreoffice.org/9997
4.2: https://gerrit.libreoffice.org/9998
Comment 25 Commit Notification 2014-07-01 21:19:55 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8bee126e1c8fe83c909fd65d8a2ea5d7fb421da1&h=libreoffice-4-3

Resolves fdo#43277  Send Legacy Report "E-Mail as ..."=>error message


It will be available in LibreOffice 4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2014-07-07 11:02:15 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f72d77e627468b08bce23bf4a5d97cb2ac931afe&h=libreoffice-4-2

Resolves fdo#43277  Send Legacy Report "E-Mail as ..."=>error message


It will be available in LibreOffice 4.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 27 Øystein Hermansen 2014-08-01 08:49:59 UTC
THe bug is still present in Libreoffice 4.3.0.4 on OSX.  

Comment 25 says "It has been pushed to "libreoffice-4-3".  It might be, but it there are still problems using this function at OSX.
Comment 28 Julien Nabet 2014-08-01 11:44:04 UTC
Øystein Hermansen: could you be more specific? Do you reproduce the initial problem, I mean with the error popup https://bugs.freedesktop.org/attachment.cgi?id=53886 ?
If not, could you submit a new bug by using this link https://www.libreoffice.org/get-help/bug/ ?

Also, for the test, could you rename your LO directory profile (see https://wiki.documentfoundation.org/UserProfile#Mac_OS_X) and give it a new try?
Comment 29 Julien Nabet 2014-08-09 06:21:11 UTC
*** Bug 82038 has been marked as a duplicate of this bug. ***
Comment 30 Julien Nabet 2014-08-09 06:22:33 UTC
4.2.6 is ok but 4.3.0.4 and master sources updated some days ago fail with same symptoms
-> Regression here
Comment 31 Julien Nabet 2014-08-09 12:49:19 UTC
More wondering about this, the problem is different since it doesn't happen on Linux.
So I put it this one back to SOLVED and reopen the wrong dup.
Sorry for the noise.