Problem - after upgrading Orbeon version, error messages in browser console log

73 views
Skip to first unread message

Jaanus T

unread,
Jan 13, 2025, 2:20:12 PMJan 13
to Orbeon Forms
fr:section component started to spam the logs with an XPath error when upgraded Orbeon from 2022.1.4-pe to 2023.1.2-pe:
INFO XFormsServer - XPath error None.get while evaluating expression xxf:readonly(xxf:component-context()) or fr:is-readonly-mode() (evaluating variable view-mode)
INFO XFormsServer - XPath error None.get while evaluating expression fr:is-readonly-mode() or not(fr:component-param-value('open') = 'false') (evaluating variable initially-open)

When we extracted the function fr:is-readonly-mode() out and tested separately:
<xforms:output value="if(fr:is-readonly-mode()) then 'true' else 'false'">
<xforms:label>fr:is-readonly-mode() value: </xforms:label>
</xforms:output>

the results were:
2022.1.4-pe
no error, function crashes or at least does not work as no true/false value printed out

2023.1.2-pe
error:
INFO XFormsServer - XPath error None.get while evaluating expression if(fr:is-readonly-mode()) then 'true' else 'false' (computing value)
and no true/false value printed out

We are using plain XForms, not the Form Runner
We have set the property:
<property as="xs:string" name="oxf.xforms.function-library" value="org.orbeon.oxf.fr.library.FormRunnerFunctionLibrary"/>

Option 2?
Maybe is it possible to disable such info level error logs? 

Alessandro Vernet

unread,
Jan 13, 2025, 6:40:49 PMJan 13
to orb...@googlegroups.com
Hi Jaanus,

You might be encountering an issue that was fixed between versions 2023.1.2 and 2023.1.6, the latest maintenance release of 2023.1. Could you try upgrading to version 2023.1.6? If the problem persists, would you be able to create a standalone example that we can use to reproduce the issue?

-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/orbeon/29ee0806-795d-4c74-9379-8ee257a42620n%40googlegroups.com.

Jaanus T

unread,
Jan 16, 2025, 7:14:28 PMJan 16
to Orbeon Forms
Hello,
Tried updating but issue persists -'
'
Exampple form:

    <xforms:output value="if(fr:is-readonly-mode()) then 'true' else 'false'">
    <xforms:label>Label for function fr:is-readonly-mode() value: </xforms:label>
    </xforms:output>
    <xforms:output value="if(true()) then 'true' else 'false'">
    <xforms:label>Label for function true() value: </xforms:label>
    </xforms:output>

    <fr:section>
    <xforms:label>Details</xforms:label>
    <xforms:group>
    <xforms:label>Detail label</xforms:label>
    </xforms:group>
    </fr:section>
    </xforms:group>

    </xhtml:body>
    </xhtml:html>`




    And in logs:

    2025-01-15 16:58:32 2025-01-15T16:58:32,299 org.log4s.Logger$InfoLevelLogger$.apply$extension0(Logger.scala:31) INFO XFormsServer - XPath error None.get while evaluating expression xxf:readonly(xxf:component-context()) or fr:is-readonly-mode() (evaluating variable view-mode)
    2025-01-15 16:58:32 2025-01-15T16:58:32,299 org.log4s.Logger$InfoLevelLogger$.apply$extension0(Logger.scala:31) INFO XFormsServer - XPath error None.get while evaluating expression fr:is-readonly-mode() or not(fr:component-param-value('open') = 'false') (evaluating variable initially-open)
    2025-01-15 16:58:32 2025-01-15T16:58:32,300 org.log4s.Logger$InfoLevelLogger$.apply$extension0(Logger.scala:31) INFO XFormsServer - XPath error None.get while evaluating expression if(fr:is-readonly-mode()) then 'true' else 'false' (computing value)
    2025-01-15 16:58:32 2025-01-15T16:58:32,302 org.log4s.Logger$InfoLevelLogger$.apply$extension0(Logger.scala:31) INFO XFormsServer - XPath error None.get while evaluating expression xxf:readonly(xxf:component-context()) or fr:is-readonly-mode() (evaluating variable view-mode)
    2025-01-15 16:58:32 2025-01-15T16:58:32,302 org.log4s.Logger$InfoLevelLogger$.apply$extension0(Logger.scala:31) INFO XFormsServer - XPath error None.get while evaluating expression fr:is-readonly-mode() or not(fr:component-param-value('open') = 'false') (evaluating variable initially-open)
    2025-01-15 16:58:32 2025-01-15T16:58:32,303 org.log4s.Logger$InfoLevelLogger$.apply$extension0(Logger.scala:31) INFO XFormsServer - XPath error None.get while evaluating expression if(fr:is-readonly-mode()) then 'true' else 'false' (computing value)

Alessandro Vernet

unread,
Jan 16, 2025, 11:33:17 PMJan 16
to orb...@googlegroups.com
Hi Jaanus,

My understanding is that you would like to use the `fr:section` XBL component in your XForms. I tested a simplified version of your example (see attached), and the section displays correctly in version 2023.1.6. I don't see any errors in the log. Are you experiencing different behavior? If so, could you provide details about what I would need to do to reproduce the issue you're encountering?

screencast.gif

-Alex

view.xhtml

Margus

unread,
Apr 9, 2025, 10:33:04 AMApr 9
to Orbeon Forms
Hi,

The simple example with `fr:section` XBL component really works but it prints XPath errors into Orbeon server logs:
INFO XFormsServer - XPath error None.get while evaluating expression fr:is-readonly-mode() or not(fr:component-param-value('open') = 'false') (evaluating variable initially-open)

I made a simple project where I was able to reproduce that issue:

br,
Margus

Alessandro Vernet

unread,
Apr 9, 2025, 10:57:26 PMApr 9
to orb...@googlegroups.com
Hi Margus,

I can now see the error! I'm not sure why I didn't see it before; maybe I expected the example not to work or to have an exception in the logs. And thank you for the Docker files; that made it very easy to reproduce.

The code for `fr:is-readonly-mode()` expects to find an `fr-parameters-instance`, which is missing outside of Form Runner. The thing is that those `fr:*` components and functions are intended to work within Form Runner. Some could work outside of Form Runner with some effort, but we don't test this use case.

I imagine that this is some XForms you wrote "by hand" and that you wouldn't be able to run this form within Form Runner? Do you have access to Basecamp for your PE support? If so, could you send a message on Basecamp so we can have a discussion and see how we can help? If not, please send me an email so I can add you to the relevant Basecamp project.

-Alex

Margus

unread,
Apr 15, 2025, 9:41:14 PMApr 15
to Orbeon Forms
Can we use the current e-mail for that?

Margus

Alessandro Vernet

unread,
Apr 15, 2025, 11:06:29 PMApr 15
to orb...@googlegroups.com
Hi Margus,

I'll follow up in private, so we can set you up on Basecamp.

-Alex

Reply all
Reply to author
Forward
0 new messages