How to display xforms error to user ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to display xforms error to user ?

ricetrac
Hello,

Before, with orbeon 3.8, when there was an error in the source of xforms page, like "XPath syntax error : expected ")", found ".." , this error was displayed on the browser in the "error page", with details of error, the name of the file, and the line number of the error.

But now, with orbeon 4.3 ou 4.4, we must to inspect the log file to find the detail of error.
It's not very simple for the developper.
Moreover, often the file name is no longer indicated, but only page-flow.xml, epilogue.xpl.

Is it possible to retrieve the "old" error page ?

Old Error page

Thank You.

Julien
Reply | Threaded
Open this post in threaded view
|

Re: How to display xforms error to user ?

ricetrac
This post was updated on .
more information : orbeon is in "dev" mode, and the value of property "oxf.xforms.show-recoverable-errors" is 1.

When the error is on a html tag, (missing the end tag, for example), the error page is correctly displaying.

But, when it is an error on a constraint, for example :
<xf:bind ref="/form/connexion/login" required="true()"
     constraint="string-length(.) > 0)"/>

=> missing parenthesis

the error is only on the log file, and in the browser we have :


thank you.

julien
Reply | Threaded
Open this post in threaded view
|

Re: How to display xforms error to user ?

Alessandro  Vernet
Administrator
Hi Julien,

I tried adding a <xf:bind ref="/*" constraint="string-length(.) > 0)"/> to an XForms file (view.xhtml), and am getting the expected error:



Are you seeing something different with this file? Or would you have an example that shows the issue you're talking about?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to display xforms error to user ?

ricetrac
Hi Alessandro,

Thank You for your response.
I do a mistake in an error.xsl : in order to display the error page in French, I customize this file.
But, I don't take the 4.4 version of this file.
Now, it's ok.

But now, I have an another problem : in dev mode, I have only one error, and in prod mode I have 0 error.
However, I modified the file properties-local-prod.xml with this :
    <property as="xs:integer" name="oxf.xforms.show-recoverable-errors" value="1"/>


I do an another mistake ?

Thank You.

Julien
Reply | Threaded
Open this post in threaded view
|

Re: How to display xforms error to user ?

Alessandro  Vernet
Administrator
Hi Julien,

What would be the simplest way for me to reproduce the issue you're seeing? Would you be able to give properties I need to set + an XForms file I need to use on top of say Orbeon Forms 4.5.1 to reproduce this? And also, with those examples, can you list the observed vs. expected behavior, so I can make sure I indeed reproduce the issue.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet