xforms-link-exceptions in model should trigger fatal error dialog

RESOLVED FIXED

Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
a year ago

People

(Reporter: Steve Speicher, Assigned: Merle Sterling)

Tracking

({fixed1.8.0.5, fixed1.8.1})

Trunk
fixed1.8.0.5, fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060403 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060403 Firefox/1.6a1

According to the spec http://www.w3.org/TR/xforms/index-all.html#evt-modelConstruct
in the list, the xforms-link-exception should be dispatched.

Current behaviour is to present dialog, per bug 329520.  Perhaps better to just dispatch the event and allow form author to handler?

This fails test suite case: 4.2.1.b2

The xforms-link-exception doesn't surface for external instance docs (test case 4.2.1.c3) either.  Should there be a separate bug or handled by this one?

Reproducible: Always

Steps to Reproduce:
(Reporter)

Comment 1

12 years ago
Created attachment 217067 [details]
test case - invalid schema ref
(Reporter)

Comment 2

12 years ago
Created attachment 217068 [details]
test case - invalid instance ref

test case 4.2.1.c3 (incase they are related, enough)

Comment 3

12 years ago
I see xforms-link-exception messages generated by both testcases.  Is that what this bug is about?  Or is the bug because we are not generating the fatal error dialog?

Updated

12 years ago
Assignee: aaronr → msterlin
(Reporter)

Comment 4

12 years ago
(In reply to comment #3)
> I see xforms-link-exception messages generated by both testcases.  Is that what
> this bug is about?  Or is the bug because we are not generating the fatal error
> dialog?
> 
I get the exceptions when the files are hosted off of bugzilla.mozilla.org.
Though, when they are hosted off of the filesystem...I don't get the exception but I do get Javascript console entries.

Could it be related to bug 329106 (help @src only works with absolute URLs)?

Comment 5

12 years ago
(In reply to comment #4)
> (In reply to comment #3)
> > I see xforms-link-exception messages generated by both testcases.  Is that what
> > this bug is about?  Or is the bug because we are not generating the fatal error
> > dialog?
> > 
> I get the exceptions when the files are hosted off of bugzilla.mozilla.org.
> Though, when they are hosted off of the filesystem...I don't get the exception
> but I do get Javascript console entries.
> 
> Could it be related to bug 329106 (help @src only works with absolute URLs)?
> 


The fact that the messages aren't popping up when running locally is because of bug 315712.  We can still use this bug to fix the fact that we need to be consistent with our use of the HandleFatalError dialog and the xforms-link-exception.  i.e. the first testcase shows the fatal error dialog while the second one doesn't.
(Reporter)

Comment 6

12 years ago
(In reply to comment #5)
> The fact that the messages aren't popping up when running locally is because of
> bug 315712.  We can still use this bug to fix the fact that we need to be
> consistent with our use of the HandleFatalError dialog and the
> xforms-link-exception.  i.e. the first testcase shows the fatal error dialog
> while the second one doesn't.

So which should it be?  I suggest that it just shows in JS console and not a fatal error dialog.  As it gives the flexibility to the form author to decide on how to handle the error (either by displaying a message or ???).

Comment 7

12 years ago
(In reply to comment #6)
> (In reply to comment #5)
> > The fact that the messages aren't popping up when running locally is because of
> > bug 315712.  We can still use this bug to fix the fact that we need to be
> > consistent with our use of the HandleFatalError dialog and the
> > xforms-link-exception.  i.e. the first testcase shows the fatal error dialog
> > while the second one doesn't.
> 
> So which should it be?  I suggest that it just shows in JS console and not a
> fatal error dialog.  As it gives the flexibility to the form author to decide
> on how to handle the error (either by displaying a message or ???).
> 

I think that we need to be consistent and if we generate a xforms fatal error that we report it in the JS Console and with the HandleFatalError dialog.  We are, at some point, going to provide the user a preference so that the fatal error dialog can be turned into a message bar kind of like the 'plugin missing' message bar that can appear at the top of the page or the user can turn off the dialog completely.
(Assignee)

Comment 8

12 years ago
Created attachment 217512 [details] [diff] [review]
FatalError dialog when instance cannot be loaded
Attachment #217512 - Flags: review?(aaronr)

Comment 9

12 years ago
Comment on attachment 217512 [details] [diff] [review]
FatalError dialog when instance cannot be loaded

Your code looks fine.  But while you are in nsXFormsModelElement.cpp, could you add HandleFatalError for the other xforms-link-exceptions in this file too, please?  I know it is out of the scope of this very specific bug, but if we are doing the fatal error popup for some link exceptions, might as well finish the collection (unless they are guarenteed to be in the same codepath).  Thanks.

removing the review request while awaiting new patch.
Attachment #217512 - Flags: review?(aaronr)
(Assignee)

Comment 10

12 years ago
Created attachment 218055 [details] [diff] [review]
Fatal Error dialog for all xforms-link-exceptions
Attachment #217512 - Attachment is obsolete: true
Attachment #218055 - Flags: review?(aaronr)

Comment 11

12 years ago
Comment on attachment 218055 [details] [diff] [review]
Fatal Error dialog for all xforms-link-exceptions

Only change that I can think of making is having "XFormsLinkException" declared once to save space.

r=me
Attachment #218055 - Flags: review?(aaronr) → review+

Updated

12 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Updated

12 years ago
Attachment #218055 - Flags: review?(allan)

Updated

12 years ago
OS: Windows XP → All
Hardware: PC → All
Summary: Schema load errors should generate: xforms-link-exception → xforms-link-exception should trigger fatal error dialog

Updated

12 years ago
Attachment #218055 - Flags: review?(allan) → review+

Updated

12 years ago
Summary: xforms-link-exception should trigger fatal error dialog → xforms-link-exceptions in model should trigger fatal error dialog

Comment 12

12 years ago
Fixed on trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch

Comment 13

12 years ago
(In reply to comment #10)
> Created an attachment (id=218055) [edit]
> Fatal Error dialog for all xforms-link-exceptions

Argh, I gave credit to sspeiche, and not you, in the checkin comment. Sorry for that :(

Updated

11 years ago
Keywords: fixed1.8.1

Updated

11 years ago
Keywords: fixed1.8.0.5

Updated

11 years ago
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.