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

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

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

Chunyu_uk
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


--
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 [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

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

Erik Bruchez
Administrator
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
Reply | Threaded
Open this post in threaded view
|

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

Chunyu_uk
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


On Monday, 21 March 2016 17:28:04 UTC, ebruchez wrote:
Chunyu,

We have a related issues:

    <a href="https://github.com/orbeon/orbeon-forms/issues/1397" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fissues%2F1397\46sa\75D\46sntz\0751\46usg\75AFQjCNEMVRW6scvkPq5DLBMyLpTJyhYa3Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fissues%2F1397\46sa\75D\46sntz\0751\46usg\75AFQjCNEMVRW6scvkPq5DLBMyLpTJyhYa3Q&#39;;return true;">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: <a href="http://discuss.orbeon.com/xxf-get-request-header-is-not-passed-in-Pdf-generation-fr-pdf-button-tp4661266p4661280.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fxxf-get-request-header-is-not-passed-in-Pdf-generation-fr-pdf-button-tp4661266p4661280.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGDOV8ql_DtaNHK3a5ck3y3DCNmnA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2Fxxf-get-request-header-is-not-passed-in-Pdf-generation-fr-pdf-button-tp4661266p4661280.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGDOV8ql_DtaNHK3a5ck3y3DCNmnA&#39;;return true;">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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

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

Erik Bruchez
Administrator
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
Reply | Threaded
Open this post in threaded view
|

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

Chunyu_uk
Hi Eric,

That's great!

Thanks,

Chunyu

On Wednesday, 6 April 2016, Erik Bruchez <[hidden email]> wrote:
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
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
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 <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;orbeon+unsubscribe@googlegroups.com&#39;)">orbeon+unsubscribe@....
To post to this group, send email to <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;orbeon@googlegroups.com&#39;)">orbeon@....

--
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 [hidden email].
To post to this group, send email to [hidden email].