Embedded orbeon: blank test page - orbeon

I have an (java/jsp) embedded form builder (version 2019.2.0.201912301747) and I would like to use the test button, but I get an empty iframe on the popup window and indeed, the embedded fb-test-iframe iframe's src is an about:blank.
Although the same is true when I drop the orbeon.war to an empty tomcat and run the form builder there, there the test page works correctly (I have to add that I have implemented a custom persistence API for my orbeon instance, maybe I should have specified somewhere some related url, I have specified only the oxf.fr.persistence.${my persistence id}.uri .)
Unfortunately there is no network activity in the browser debug (maybe because of the iframe) and no browser error, it just does not work :(
Unfortunately the documentation does not really explain the way of working of the test button.
What and where should I configure in Orbeon to force it to, I don't know, raise an event that triggers something in orbeon to load something (ideally a form runner instance that loads the currently edited form) to there?
Update #1:
After switching to orbeon-2018.2.4.201911212304-PE.zip (but keeping the 2019 libs where it is embedded), I was able to get it to communicate, so I am a bit further. Now as it is visible on the picture, the embedded orbeon sends data to its backend, and the request arrived the orbeon backend according to its logs.
orbeon.war log
But there is no answer to the last request, this is the key I think, but I don't understand why. As if there would be a further call (maybe towards the orbeon CRUD API backend, and there would be no connect/read timeout for that connection).
But there is no further communication towards the crud api, there is no new entries in the crud api backend log.
My properties-local-prod.xml
Thanks in advance.

OP mentioned in a comment that this doesn't happen with an out-of-the-box install of Orbeon Forms, and thus suspects the issue they are having was due to some change they inadvertently made to Orbeon Forms.

Related

Delphi TWebBrowser keep getting CloudFare page

When I use MS Edge, Firefox or Opera to access Cloudfare-protected webpages, it shows the page correctly. However, using TWebBrowser it always shows the Cloudfare captcha page first.
How do I configure Delphi TWebBrowser to act like a "real" web browser which does not invite the Cloudfare page?
Note that this is occasional access to the page, and yet it triggered the cloudfare when the other browsers do not trigger at that same point in time.
Not an real answer but some things i encountered with TWebBrowser on the "real" Internet.
The Sites i encountered needed different things.
Some needed a Header Information with specific Browsers.
Executing java script to read your system envronment for language (geoblocking)
Some need cookies obtained through cross site Scripting (Fraud protection)
and many other Things for various reasons.
So, for your Target Website you can sniff where your call beginns to differ from a working Browser. And then trying to reproduce the functionality for Your Application.
What you encounter is not a TWebBrowser Problem in itself. It is Browser Funtionality used to have Features like Geoblocking, Addblock detection or whatever. So you need to implement the missing Parts: Cookie Storage and/or Java Script.
The downside is: you only find one missing Part after the other. So when you start you dont know if you will hit a dead end. Doing "real Internet Sites" with TWebBrowser (based on IE 5.5) was not easy and that was around 2005 ... in the early easy days...
Optional: If you have an Invitation from the Site owner through an Api Key (or something similar for Authentification) it should work with the TWebBrowser. If all the "Protection" is not needed it worked on almost everyting.
I never found a solid working Solution, but changing the Header to be IE5.5, enabling the newer Mode(non legacy?) and Cookies + Script helped.
If possible try it with the new Edge Component or an embedded Chrome / Firefox / Opera.
In the End we used a microsoft IE COM Component and not the Delphi Component. But even then, not everything was working.

Changing the interface of a webservice witout having access to it

I have awebsite, lets just call it search, in one of my browserpages open. search has a form, which when submitted runs queries on a database to which I don't have direct access. The problem with search is that the interface is rather horrible (one cannot save the aforementioned queries etc.)
I've analyzed the request (with a proxy) which is send to the server via search and I am able to replicate it. The server even sends back the correct result, but the browser is not able to open it. (Same origin policy). Do you have any ideas on how I could tackle this problem?
The answer to your question is: you can't. At least not without using a proxy as suggested in the answer by Walter, and that would mean your web site visitors would have to knowingly login to your web site using their other web site's credentials (hmm doesn't sound good...)
The reason you can't do this is related to security, if you could run a script on the tab next to the one with the site open (which is what I'm guessing you want to do), you would be able to do a CSRF attack and get any data you wish and send it to hack.com
This is, of course, assuming that there has to be a login somewhere in the process, otherwise there's no reason for you to not be able to create a simple form which posts the required query and gets the info.
If you did have access to the mentioned website, you would be able to support cross domain xml using JSONP.
It is not possible to bypass the same origin policy in javascript (assuming that you want to do it with that considering your question). You need to set up a proxy server side that is doing the request for you and returns the html.
A simple way of doing this in PHP would be like this:
<?php
echo file_get_contents("http://searchdomainname.com" . "?" . http_build_query($_GET, '', '&'));
?>

With firebug stop loading so can see requests

I am trying to analyze a POST request using firebug. Using the net panel I can see the request, however when the POST has success the page then reloads and I only have a couple of seconds to actually look at the request and see what is going on. Is there a way I can pause it much like when analyzing scripts using this tool?
There is a "Persist" button on some of the tabs in Firebug. Just make sure to click it before doing your post.
[edit] Second row, third button from the left, on the Console and Net tabs.
Even better, if you're on Windows you can use Fiddler - an amazing and free HTTP debugger developed by some important guy on the Microsoft IE team.
With it you can conditionally intercept GET or POST requests, inspect and change parameters, break on responses, change responses (headers or body), reissue old requests and generally screw with your application during development.
Simply one of the most useful web development tools. Ever.
May require a little tweaking for localhost - see here
One solution would be to remove the refresh of the page from your code.
Then run your code to see the results.
You can use web developer tools plugin for Mozilla firefox, and disable meta redirects

Forms submitting twice in Struts 2, Hibernate application behing a network proxy

I have a struts2, Hibernate and Spring application. It works properly at our local end. When we deploy the application on the development server sometimes some forms are submitted twice on form submission. This is causing duplicate data to be entered in the database.
This is happening only on server. This is happening rarely on Firefox but very frequently in IE. And again this happens on only some forms and not on other forms. There is nothing to differentiate those forms though.
We have sometimes used struts 2 submit button to submit forms and sometimes used java script with simple buttons to submit the form.
As a last way we can use interceptor to prevent double forms submission (We will have to make changes to lot of forms) but the point is its not happening at local end at all. Why its happening on server only and that too on some forms and sometimes only.
EDIT:
The other thing I noticed is that when I use no network proxy then even on server form is not submitted twice but when a network proxy is used, the form is submitted twice. The app works fine without any proxy properly. No duplicates at all.
What proxies has to do with it? Has anyone encountered any such issues with network proxy and double form submission?
EDIT2:
Just now I have found out that while using proxy sometimes access is denied in that case post request is sent twice by the browser resulting in double form submission.
If I see the http header I can see two post requests with one of them having following in headers
HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the the request. Access to the Web Proxy service is denied. )
Any ideas about this?
Please help.
If you use jsp and use
<html:submit .... onClick="some javascript code">
you might try to use
<html:button .... onClick=:some javascript code" >
The condition happened to me was
I use "form" tag in my jsp page
I use additional button inside the form tag, which is using javascript that submit the form
Hope it would help.

Web part async postback getting Sys.WebForms.PageRequestManagerParserErrorException

Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
http://servername/ScriptResource.axd?d=EltQ7pexCbRndWc7D3a....b2a49de
Line: 5
I recently converted a SmartPart + UserControl web part to a 'real' web part. The user control part remained essentially unchanged and contains an UpdatePanel. The aim is to have an interactive calendar control which updates its own data but does not cause a full page refresh. The main reason for converting to a real web part is to make use of personal storage so that users can choose a particular setting and store it.
The problem I now have is that when one of the LinkButtons in my web part are clicked I get the error listed above. I am not doing any Response.Writes and there don't seem to be any HttpHeader entries in IIS.
Can anyone help here? Thanks.
New clue
Just noticed that the postback events work when the page is checked out but not when it has been published. What is the significance of this?
Have you added the sharepoint script manager:
http://msdn.microsoft.com/en-us/library/ff650218.aspx
It sounds like a HttpModule is altering the json postback of the update panel

Resources