xxf:get-request-header() is not passed in Pdf generation (<fr:pdf-button/>)

22 views
Skip to first unread message

Chunyu

unread,
Mar 18, 2016, 6:34:52 AM3/18/16
to Orbeon Forms
Hello,

We are facing missing content in the pdf generation and we use the default pdf button from Orbeon.

We found the problem is from xxf:get-request-header(), which is not passed into the pdf request when the button is clicked.

We defined some variables which are from xxf:get-request-header and put them in the 'relevant' of the bind. Please see one example:

<xf:model id="fr-form-model" xxf:expose-xpath-types="true">
      <xf:var name="is-appraisal" value="xxf:get-request-header('isAppraiser')  = 'true'"/>
.....

<xf:bind id="questionnaire" name="questionnaire" ref="questionnaire"  relevant="$is-appraisal">

....

We have the pdf version of that form instance, that 'questionnaire' is missing, but it is fine with edit, new and view modes.

Could you help us to find a solution to pass those request headers to Pdf generation please?

We have many forms which are using that kind of variables.

Is possible to do it in properties-local.xml? How to do that there?

Many Thanks,

Chunyu Wilson

Consultant

MarkLogic Corporation

www.marklogic.com


Erik Bruchez

unread,
Mar 21, 2016, 1:28:04 PM3/21/16
to orb...@googlegroups.com
Chunyu,

We have a related issues:

https://github.com/orbeon/orbeon-forms/issues/1397

In the meanwhile, you should be able to work around this by forwarding
headers:

<property
as="xs:string"
name="oxf.http.forward-headers"
value="...space-separated header names to forward..."/>

Which Orbeon Forms version are you using, by the way?

-Erik

--
View this message in context: http://discuss.orbeon.com/xxf-get-request-header-is-not-passed-in-Pdf-generation-fr-pdf-button-tp4661266p4661280.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

Chunyu

unread,
Mar 22, 2016, 4:11:07 AM3/22/16
to Orbeon Forms
Hi Eric,

We are using a custom edition on top of 4.10 Orbeon CE edition, the exact number is 4.10.2.marklogic.201602022321-CE.


However, I tried the solution below in the properties-local.xml and it does not work in pdf still. Some sections with those variables are in the 'relevant' of bind are still missing.


<property as="xs:string" name="oxf.http.forward-headers" value="isAppraiser isApplicant isAppraisalReviewer isApplicationApprover"/>


Could you please look into this?

We have a lot of forms which have the similar problem and the site is on live now.


Thanks,


Chunyu

Erik Bruchez

unread,
Apr 6, 2016, 12:33:08 AM4/6/16
to orb...@googlegroups.com
Chunyu,

I have reproduced the issue now. It works with the upcoming 4.11, but not
4.10, with this fix we did back last September:

https://github.com/orbeon/orbeon-forms/issues/1078

I have backported the fix to your build and will send it to you via our
support site.

-Erik

--
View this message in context: http://discuss.orbeon.com/xxf-get-request-header-is-not-passed-in-Pdf-generation-fr-pdf-button-tp4661266p4661363.html

Chunyu Cong

unread,
Apr 7, 2016, 2:47:32 AM4/7/16
to orb...@googlegroups.com
Hi Eric,

That's great!

Thanks,

Chunyu
--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/Rbf0vGCg8C4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
To post to this group, send email to orb...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages