Discussion:
[orbeon] form builder integration issues
Sorin Vasilescu
2018-08-22 12:31:55 UTC
Permalink
Hi,

I've done the following things:
- I'm loading form builder in an iframe (like described here
<https://doc.orbeon.com/form-runner/link-embed/linking>, but with
URL /orbeon/fr/orbeon/builder/new)
- I'm proxying all requests to /orbeon in order to add headers for user and
group (like described here
<https://doc.orbeon.com/form-runner/access-control/users#header-driven-method>
)
- I'm also dynamically adding some inputs for CSRF purposes and
reconfiguring the YUI default headers, also for CSRF

I can successfully create, edit, save and publish forms this way, but I
have two issues:

1. The "Test" button does not work, it loads the form builder UI, instead
of loading a form runner displaying the form. Any idea what I might be
doing wrong?

[image: Screenshot from 2018-08-22 14-35-42.png] <about:invalid#zClosurez>


2. If I create a form while I'm in the iframe and the form gets created
with a username and group, I can't edit it directly from the orbeon
interface later, I just get a nondescript error message. Is this how it's
intended to work because of form builder permissions?

Integrated:

[image: Screenshot from 2018-08-22 14-52-53.png] <about:invalid#zClosurez>



Stand-alone:

[image: Screenshot from 2018-08-22 14-53-12.png] <about:invalid#zClosurez>

Thanks,
Sorin.
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-08-24 09:34:26 UTC
Permalink
Hi Alex,

Thanks for the assist, I've enabled some more logging levels and looked at
the log.

The JSESSIONID is a cookie on the client browser. As each request
originates from the same client browser, the same cookie is there. The
proxy forwards all cookies, headers, etc to Orbeon from the original
request it gets from the browser.
I am attaching file orbeon-builder-test-log.txt which contains the things
that happen when I click "Test", I'm afraid I don't know enough to
interpret it.
However, logging from the proxy tells me I always send JSESSIONID cookie
with the value 034A98241971E610710796029F506A97

Regarding the error when editing, I can see an error in the log, but again
I don't know how to interpret that. I've attached
orbeon-builder-edit-log.txt

Thanks,
Sorin.

Sorin Vasilescu
***@gmail.com
+40726144965
Hi Sorin,
Does using the iframe make any difference? What if you load
/orbeon/fr/orbeon/builder/new directly in your browser?
The proxying of the requests can be tricky, as you need to make sure that
the `JSESSIONID` used when producing the page is the same as the one sent
to
Orbeon Forms in subsequent requests (which may be different than the
`JSESSIONID` between the browser and your proxy). Does your proxy guarantee
this?
Finally, regarding the error shown in your second screenshot, I'd recommend
you check your `orbeon.log`, and see if it sheds some light on the reason
for this error.
You'll let me know if this helps.
Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-08-26 20:25:49 UTC
Permalink
Hi Alex,

No clue where "defer" might come from, I haven't manually added anything
like that to the form.

Basically, I just created a form using the form builder in the iframe and
with the proxy.
Simplest way I can think of is to attach a dump of my db and config files.
I'm using version 2017.2.2.201805182106-PE.

Can you try to reproduce using that?
I'm thinking if you can, then there's either a bug, or my data is invalid
for some reason.

Best regards,
Sorin.

Sorin Vasilescu
***@gmail.com
+40726144965
Hi Sorin,
Let's start with what might be a simple one, since we have an error we can
Fatal error: Attribute name "defer" associated with an element
type "script" must be followed by the ' = ' character.
Can you think of where that `defer` attribute name with no value comes
from?
Is this something you added to a form? If not, what would the simplest way
for me to reproduce the issue starting from a verbatim install of Orbeon
Forms?
Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-08-28 19:17:17 UTC
Permalink
Hi,

Yes, I can reproduce it with a form as it loads from the new action, no
changes, just save, on a verbatim install of Orbeon with only MySQL db
configured.

However, it only happens when I use the iframe/proxy combination. So you'd
need that too if you want to reproduce the issue, which is problematic,
because you'd need apache, php and the whole php project that does that.

I did take a shot in the dark, however, and I deleted the folder
$CATALINA_HOME/temp/orbeon/cache and the issue goes away.
I've no idea what's in there, but if it helps, I can zip the whole cache
folder and send it to you.

Best regards,
Sorin.

Sorin Vasilescu
***@gmail.com
+40726144965
Hi Sorin,
By "simplest", I meant "smallest test case that reproduces the problem".
Can
you reproduce the "defer issue" with a minimal form you create on a
verbatim
install of Orbeon Forms? If not, I'd recommend you progressively add to
that
config until you get to reproduce the issue, this in order to figure what
causes the issue. You'll let me know what you find!
Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-08-31 08:00:29 UTC
Permalink
Hi,

No clue, but I'll stick to that workaround if I encounter that issue again.

That leaves the Test button. Do you think I could connect a debugger to
Tomcat and use the code on GitHub to set some breakpoints and try to figure
it out?

Thanks,
Sorin.

Sorin Vasilescu
***@gmail.com
+40726144965
Hi Sorin,
Well, I'm not sure why this solves the problem you were having ;), but I'm
glad it works for you now!
Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-09-13 11:43:54 UTC
Permalink
Hi,

Sorry, haven't had time until just now, thanks for getting back to me.
I've tried Wireshark, and I've found something interesting.

When requesting the test iframe, the client always makes 3 requests, which
I can follow from Chrome's developer console to the proxy log and to
Wireshark respectively:
2 requests to http://localhost/orbeon/xforms-server
1 request to
http://localhost/orbeon/fr/orbeon/builder/edit/e8b5efacf4d28faaccda2ff9843e3e2f342794e1

Requests go from port 54336 (Chrome) to 80 (Apache) and then to 9080
(Tomcat) and responses are interleaved as expected.
All requests from the client that get proxied to 9080 have the JSESSIONID
cookie with the correct value.

However, I've identified an extra request that happens when I use the
proxy. What's weird though, is that the requests doesn't originate on the
client, I can't find it going to Apache, only to Tomcat.
It looks like it's an internal Orbeon request, but it still goes through
the loopback interface:
/fr/service/persistence/crud/orbeon/builder/form/form.xhtml
This request has a different JSESSIONID from the other ones, but I seem to
have no control over it.

Also, the Orbeon logs differ in the two usecases, they reflect the extra
request and the different session id.
Attached are the capture file for the proxied usecase and the logs for both
proxied and direct usecases.

Any clue who might be making that request and why the JSESSIONID might be
different?

Thanks,
Sorin.

Sorin Vasilescu
***@gmail.com
+40726144965
Sorin, did you get a chance to compare the HTTP requests, per my earlier
message? -Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-09-17 19:00:31 UTC
Permalink
Hi,

You are using release-2018.1, but I can't, form builder does not load for
me, I guess because of this bug:
https://stackoverflow.com/questions/52264285/orbeon-2018-1-bug-in-initialization-of-opsxformsproperties
In my 2017.2-ce codebase, it's line 150, not line 151.

Other than that, I always see findInternalURL returning something like
Some(/fr/service...)
Also, in the URLs being returned, I can't find any mention of the URL I see
in Wireshark, which is
/fr/orbeon/builder/edit/e8b5efacf4d28faaccda2ff9843e3e2f342794e1

Best regards,
Sorin.

Sorin Vasilescu
***@gmail.com
+40726144965
Hi Sorin,
I am not sure why the request to load the form happens over HTTP in that
case; it should be an "internal request", which you can't see with
WireShark. Would you be able to connect to Tomcat with a debugger to see
what is going on? I would debug code around the line linked below. Is
`findInternalURL()` indeed isn't returning a `Some(internalPath)`? If so,
I'd debug the function itself and see why it determines the path not to be
internal.
https://github.com/orbeon/orbeon-forms/blob/tag-release-2018.1-ce/src/main/scala/org/orbeon/oxf/util/Connection.scala#L151
You'll let me know what you find if you get a chance to debug this.
-Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-09-20 11:09:46 UTC
Permalink
Hi,

I've installed the build you linked, but it looks the same to me. I still
don't see any connection to the URL I'm seeing in Wirecast.

Maybe I'm missing something. You have a screencast attached of the browser
on one side and the debug window on the other.

Best regards,
Sorin.

Sorin Vasilescu
***@gmail.com
+40726144965
Hi Sorin,
OK, #3736 is fixed and will be in 2018.1.1, which we'll also release for
Orbeon Forms CE. For now, you can use the test build linked below which
includes the fix. You'll let me know if using 2018.1 makes a difference.
https://s3.amazonaws.com/orbeon-builds/orbeon/orbeon-forms/4524/4524.2/build/distrib/orbeon-2018.1.1.201809181825-CE.zip
-Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Sorin Vasilescu
2018-09-20 18:59:53 UTC
Permalink
Hi, Alex,

Thanks for the support so far, we can definitely park this topic. We're
going to get the PE license eventually, not sure about dev support, but
we'll check it out.


It would, however help me a lot if I could unblock the other issue I'm
having with the autocomplete, but there's a different thread for that.

Best regards,
Sorin.
Got it Sorin, it was worth a try. I'm afraid there isn't much that we can
do to help you through this community forum, as it seems we would need to
dig in deeper to figure out why your custom integration doesn't work, maybe
doing a WebEx to get a good understanding of what is going on and what your
code does, but this is something we don't have the bandwidth to do for
free. We do this for customers using Orbeon Forms PE (
https://www.orbeon.com/pricing) who have Dev Support (
https://www.orbeon.com/services), in case that is an option for your
organization.
-Alex
Post by Sorin Vasilescu
Hi,
I've installed the build you linked, but it looks the same to me. I still
don't see any connection to the URL I'm seeing in Wirecast.
Maybe I'm missing something. You have a screencast attached of the
browser on one side and the debug window on the other.
Best regards,
Sorin.
Sorin Vasilescu
+40726144965
Hi Sorin,
OK, #3736 is fixed and will be in 2018.1.1, which we'll also release for
Orbeon Forms CE. For now, you can use the test build linked below which
includes the fix. You'll let me know if using 2018.1 makes a difference.
https://s3.amazonaws.com/orbeon-builds/orbeon/orbeon-forms/4524/4524.2/build/distrib/orbeon-2018.1.1.201809181825-CE.zip
-Alex
-----
--
--
Sent from: http://discuss.orbeon.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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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
--
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/VyOIFEXLcoU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Continue reading on narkive:
Loading...