Closed Bug 488330 Opened 15 years ago Closed 15 years ago

The URI schema 'mailto:' is not supported when submitting XForm results.

Categories

(Core Graveyard :: XForms, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: garysetter, Assigned: aaronr)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)

The URI schema 'mailto:' is not supported when submitting form results. It is needed on the <xf:submission>element, action attribute. When I attempt to use it I receive an error. See the example at the end of this bug log.

See the XForms recommendation, section 11.9 Submission Options:
"Other bindings, in particular to the URI scheme "mailto:" may, and the schemes "https:" and "file:" should, be supported."

Example:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="Gary" />
<meta name="Organization" content="none" />
<meta name="DescriptionVersion" content="1" />
<meta name="Generator" content="Descriptive Data Capture" />
<title>Submit form results to a e-mail account</title>
<style type="text/css">
* { font-family="Arial";font-size: 12pt;}
.LiteralStyle { color=#0000ff;}
.Meaningless { color=#804000;}
</style>
<xf:model>
  <xf:instance xmlns="">
    <Main>
      <All>
      <Meaningless />
      </All>
    </Main>
  </xf:instance>
<xf:submission id="save" method="put" action="mailto:bob@newhart.net" >
  <xf:toggle case="case-busy" ev:event="xforms-submit"/>
  <xf:toggle case="case-submit-error" ev:event="xforms-submit-error"/>
  <xf:toggle case="case-submit-done" ev:event="xforms-submit-done"/>
</xf:submission>
</xf:model>
</head>
<body>
<xf:input ref="/Main/All/Meaningless" class="All">
<xf:label class="All"> Enter meaningless Test data: </xf:label></xf:input>
<br />
<br /><xf:submit submission="save">
  <xf:label>Submit</xf:label>
</xf:submit>
<p>
<xf:output ref="/Main/All/Meaningless" />
</p>
<xf:switch>
    <xf:case id="ready"/>
    <xf:case id="case-busy">
        <p>Waiting for results from server...</p>
    </xf:case>
    <xf:case id="case-submit-error">
        <p>Submit error</p>
    </xf:case>
    <xf:case id="case-submit-done">
        <p>Submit done</p>
    </xf:case>
</xf:switch>
</body>
</html>

Reproducible: Always

Steps to Reproduce:
1. Save the attached .xhtml file and open it in Firefox
2. You can enter a value in the edit box, if you wish
3. Press the submit button
Actual Results:  
The display changes to indicate that submit failed.

Expected Results:  
I expected the results to be sent as an e-mail.

Note that if you use the older html form/submit elements, Firefox creates the e-mail just fine.
Forms support is not yet built into Firefox.
Gary, are you doing this with https://addons.mozilla.org/en-US/firefox/addon/824 installed?
Summary: The URI schema 'mailto:' is not supported when submitting form results. → The URI schema 'mailto:' is not supported when submitting XForm results.
Yeah, I think Gary mis-filed the bug.  Trying to move it over to xforms.
Component: General → XForms
Product: Firefox → Core
QA Contact: general → xforms
We have mailto support for submission but looks like it broke between FF2 and FF3.  I will try to get to fixing this next week.
Assignee: nobody → aaronr
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch fixSplinter Review
Looks like I ported this part poorly when I made the libxul patch for FF3.  The mailtoUrl and body need to be put together and passed into ios->NewUri.  But ios->EscapeURL doesn't append like NS_EscapeURL used to, it overwrites.  So now need to append by hand.
Attachment #375962 - Flags: review?(doronr)
Attachment #375962 - Flags: review?(doronr) → review+
Attachment #375962 - Flags: review?(Olli.Pettay)
Attachment #375962 - Flags: review?(Olli.Pettay) → review+
fixed on 1.9 branch.  Checkin still needed for Hg.
landed on hg - http://hg.mozilla.org/xforms/rev/57cbd334ac4d
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: