bharlow/fm-webdirect-custom

back to previous page

Closed this issue · 5 comments

when I submitted a blank username and password ,it redirects to fm default login form, how do I redirect to custom page and message user a error message?

I'm just playing with this now for the first time in several years.
The "basic" version (after you comment out the redirect) points you to the WD credentials page after clicking the "Login" button. Bad or blank creds give an error and allow you to click the "x" and return to the login page.

The "form" version gets you stuck in a nearly interminable loop if you enter bad credentials (a known issue), so I'm sticking with the basic version.

Yes, this is an issue with FileMaker Server. What happens is that for custom form posts the information to the FM server and if the login in FileMaker results in an error, it posts back to an invalid URL.

Example Response URL for HTTP Post from FileMaker https://fms.example.comhttps://web.example.com/webd-custom/index.html?homeurl=https://web.example.com/webd-custom/index.html&db=webd-example&loginerr=212&guesten=0

I've considered writing a workaround by having it post via AJAX to do an error check, but it would be better if FileMaker would correct their issue on the Server side. Are you interested in seeing a workaround?

I'm fine with the "basic" version. Gives me more room on the landing page to explain about the foibles of WD - you know - don't use the back button and so forth.

Altogether a very nice, clean implementation and a great way to avoid FM's default login screen.

As a work around for the failed redirect from an invalid login, consider adding this script to the head section of the home.html file in the \Web Publishing\publishing-engine\jwpc-tomcat\fmi\VAADIN\launchcenter\ directory.

<script type="text/javascript">
top.location.href = top.location.protocol + '//' + top.location.hostname + window.location.search;
</script>

So this has been resolved in FileMaker 19, however the issue still exists in prior version of FileMaker.

As this is a stand alone version, I do not include modifications to customize installed FileMaker files. You can modify file in your FileMaker directory, but it can have unintended consequences.