Last Comment Bug 332604 - xforms-link-exceptions in model should trigger fatal error dialog
: xforms-link-exceptions in model should trigger fatal error dialog
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Merle Sterling
: Stephen Pride
Mentors:
http://www.w3.org/MarkUp/Forms/Test/X...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-03 13:43 PDT by Steve Speicher
Modified: 2016-07-15 14:46 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
test case - invalid schema ref (951 bytes, application/xhtml+xml)
2006-04-03 13:46 PDT, Steve Speicher
no flags Details
test case - invalid instance ref (963 bytes, application/xhtml+xml)
2006-04-03 13:49 PDT, Steve Speicher
no flags Details
FatalError dialog when instance cannot be loaded (1.15 KB, patch)
2006-04-06 17:37 PDT, Merle Sterling
no flags Details | Diff | Splinter Review
Fatal Error dialog for all xforms-link-exceptions (2.71 KB, patch)
2006-04-11 11:56 PDT, Merle Sterling
aaronr: review+
allan: review+
Details | Diff | Splinter Review

Description Steve Speicher 2006-04-03 13:43:25 PDT
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:
Comment 1 Steve Speicher 2006-04-03 13:46:27 PDT
Created attachment 217067 [details]
test case - invalid schema ref
Comment 2 Steve Speicher 2006-04-03 13:49:09 PDT
Created attachment 217068 [details]
test case - invalid instance ref

test case 4.2.1.c3 (incase they are related, enough)
Comment 3 aaronr 2006-04-03 14:32:35 PDT
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?
Comment 4 Steve Speicher 2006-04-04 05:04:05 PDT
(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 aaronr 2006-04-04 11:18:22 PDT
(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.
Comment 6 Steve Speicher 2006-04-04 19:03:25 PDT
(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 aaronr 2006-04-05 10:39:21 PDT
(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.
Comment 8 Merle Sterling 2006-04-06 17:37:40 PDT
Created attachment 217512 [details] [diff] [review]
FatalError dialog when instance cannot be loaded
Comment 9 aaronr 2006-04-10 15:58:40 PDT
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.
Comment 10 Merle Sterling 2006-04-11 11:56:30 PDT
Created attachment 218055 [details] [diff] [review]
Fatal Error dialog for all xforms-link-exceptions
Comment 11 aaronr 2006-04-11 12:22:05 PDT
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
Comment 12 Allan Beaufour 2006-04-20 03:19:05 PDT
Fixed on trunk
Comment 13 Allan Beaufour 2006-04-20 03:20:12 PDT
(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 :(

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