Last Comment Bug 338933 - external instance not restored (on xforms-reset) after replace=instance
: external instance not restored (on xforms-reset) after replace=instance
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core
Classification: Components
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Allan Beaufour
: Stephen Pride
Mentors:
http://www.w3.org/TR/xforms/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-23 00:58 PDT by Allan Beaufour
Modified: 2006-06-06 07:05 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (not working out-of-the-box) (2.23 KB, application/xhtml+xml)
2006-05-23 01:07 PDT, Allan Beaufour
no flags Details
Patch (2.59 KB, patch)
2006-05-23 07:31 PDT, Allan Beaufour
doronr: review+
bugs: review+
Details | Diff | Review

Description Allan Beaufour 2006-05-23 00:58:25 PDT
We seem to have problems with restoring external instances (via xforms-reset), when they are external and they have been replaced via submission.
http://groups.google.com/group/mozilla.dev.tech.xforms/browse_frm/thread/abc88b273a0ef9a2/8a0b054c2966476e#8a0b054c2966476e
Comment 1 Allan Beaufour 2006-05-23 00:59:03 PDT
This warning is printed:
WARNING: failed to restore original instance document: 'NS_SUCCEEDED(rv)', file nsXFormsInstanceElement.cpp, line 385
Comment 2 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2006-05-23 01:06:19 PDT
Hmm, should there be importNode, not cloneNode. At least in trunk.
Comment 3 Allan Beaufour 2006-05-23 01:07:54 PDT
Created attachment 223005 [details]
Testcase (not working out-of-the-box)

Here's a testcase, but with external instances, etc. it needs to be fiddled with to get working. But it should show "the concept".
Comment 4 Allan Beaufour 2006-05-23 07:31:45 PDT
Created attachment 223029 [details] [diff] [review]
Patch

Just clone the original document and set it as the instance document.

I see no reason for trying to retain the original document element, as we replace that on submissions, etc. anyway.
Comment 5 Allan Beaufour 2006-05-23 08:22:18 PDT
Fixed on trunk

Note You need to log in before you can comment on or make changes to this bug.