js-errors when trying to Compose E-Mail to Attendees from Sunbird

RESOLVED FIXED in 0.8

Status

defect
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: giermann, Assigned: giermann)

Tracking

({regression})

Dependency tree / graph

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

12 years ago
Attendees in Sunbird's event show the ability to Compose E-Mail in context menu, but this does not work and produces an error in Javascript console:

Error: uncaught exception: [Exception... "Component returned failure code: 0x804b000a [nsIIOService.newURI]"  nsresult: "0x804b000a (<unknown>)"  location: "JS frame :: chrome://calendar/content/calUtils.js :: sendMailTo :: line 1736"  data: no]
Assignee

Comment 1

12 years ago
The decision, whether to remove these menu items or to add the checkbox "Send mail invitations" (like in Lightning) has to be done by UI-Team...
Assignee

Updated

12 years ago
Blocks: 404900
If I remember correctly this used to work. Could you narrow down the regression range?
Flags: blocking-calendar0.8?
Confirmed as regression:
  Works in Sunbird 0.8pre (2007-12-14-03)
  Fails in Sunbird 0.8pre (2007-12-15-05)
    
Checkins during regression range: http://tinyurl.com/2jjboz

--> Regressed by the checkin from Bug 388018
Blocks: 388018
Keywords: regression
Assignee

Comment 4

12 years ago
Stefan, thanks for doing most of the work!

This one is quite obvious.
Since Mickey currently does no reviews, I chose Daniel...
Assignee: nobody → giermann
Status: NEW → ASSIGNED
Attachment #303481 - Flags: review?(daniel.boelzle)
(In reply to bug 388018 comment #17)
> (In reply to bug 388018 comment #16)
> >-        var uriString = "mailto:" + aRecipient;
> >+        var uriString = "";
> >         var uriParams = [];
> >+        if (!aRecipient || aRecipient.length < 1) {
> >+            uriString = "mailto:" + aRecipient;
> >+        }
> The purpose was to make the function sendMailTo() allow sending
> mails without being forced to specify a dedicated recipient.
> Assume we drop an event without an organizer onto the mail
> button, in this case the mail compose window should come up
> with an empty recipient field. Without the above change,
> sendMailTo() just silently failed.

We are only reaching this branch if we are in Sunbird and want to call the systems mailto: protocol handler. In this case a valid recipient is required. In my opinion we need to exit this branch early if no recipient is specified - as it was before the checkin from bug 388018.
Comment on attachment 303481 [details] [diff] [review]
Correcting simple cut&paste error...

daniel is on vacation
Attachment #303481 - Flags: review?(daniel.boelzle) → review?(philipp)
Comment on attachment 303481 [details] [diff] [review]
Correcting simple cut&paste error...

From a quick test it seems that something like "mailto:?subject=test" or even "mailto:" also works. This means uriString must be initialized to "mailto:". If a recipient is passed it should be added.
Assignee

Comment 8

12 years ago
Attachment #303481 - Attachment is obsolete: true
Attachment #303508 - Flags: review?(philipp)
Attachment #303481 - Flags: review?(philipp)
Comment on attachment 303508 [details] [diff] [review]
Patch v2, enabling empty recipient

Looks good, r=philipp
Attachment #303508 - Flags: review?(philipp) → review+
Checked in on HEAD and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.8
Flags: blocking-calendar0.8?
You need to log in before you can comment on or make changes to this bug.