Jump to content

This topic is 7519 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

OK, I have a database and it's shared using the web companion and it works fine.

It is a list of e-mail newsletters, about 10 in total.

I've been making a website archive of these and on the front page of the archive is a list of the months that the bulletins have been sent - a user then clicks the month link which does a search, to return a list of the bulletins sent in that month.

On that front archive page there is a search box also, which works fine when searching for something that is present in the database but I get a 'could not find format file' error if the search criteria does not return any records.

The format files i'm using for this task are all in a sub-folder of the FileMaker web directory, meaning in the <form code for my search box...

<input name="-Format" value="../internal/searchresults.html"

When the web companion error message pops up it strikes me as if there is a problem with the javascript that controls the web companion errors.

When I search for something that isn't in the database the error that pops up says...

Format file not found:

The format file "..internalsearchresults.html" could not be found.

So it's as if when your format/error files are in subfolders of the web directory, and an error is returned, the "/" are ignored.

I've tried to remedy this by changing the <input code in my search form to be...

<input name="-Format" value="..//internal//searchresults.html"

as that has tended to solve things when there's been conflicts with JavaScript, the javascript parser assuming the / is an escape character or something

Unfortunately I still get an error...

Format file not found:

The format file "../internal/searchresults.html" could not be found.

So at least this time it's recognising the "/" character, just the first one gets missed off.

Why am I getting this error?

The search box works fine when the search string is found in the database, meaning the format file is there and correct.

I had a look in the access log on the filemaker unlimited computer and this is what it says for that error...

192.168.1.12 - - [30/Jun/2004:18:39:55 +0000] "POST /FMPro HTTP/1.1" 200 1495

In the error log it just says...

[30/Jun/2004:18:39:55 +0000] ERROR: -1. Could not find format file.

It seems from the access log that it's returning some sort of error code '1495', anyone know where to find a list of web companion error codes?

Thanks

Posted

Hi, Batfastad! I haven't seen FM drop / before, but I usually declare the subfolder in the FORM ACTION,

<FORM ACTION = "http://www.mysite.com/subfolder/FMPro" METHOD = "post">

... <INPUT TYPE="hidden" NAME="-error" VALUE="error.html">

Also, double-check your -error to make sure it's going to your desired page... maybe the format file not found is for a missing -error page and not your searchresults.html. I've also had false format file not found errors that had nothing to do with the format file. I don't know JavaScript but would recommend taking JS out of the equation first to make sure it's not that.

--ST

Posted

I have never used a path such as

<FORM ACTION = "http://www.mysite.com/subfolder/FMPro"

as suggested by Steve.

<form action="fmpro" method="post"> has always worked well for me as long as db's are open as they should be. Since the db's are not kept in the web folder for security reasons, why display the file location in html which allows exposure to the location through View Source?

But I've been wrong many times.

Posted

OK it's all solved and sorted.

I hadn't yet got round to doing my -Error page, so there was none there!

Changing -Error in the <form to the results page temporarily seems to have done the trick!

I was being especially stupid yesterday.

Thanks for your help guys.

Posted

Cool. Yeah, it's often something like that.

Unable has a good point and there certainly are several ways to do it, but we find it easier to declare the subfolder in the FORM rather than in the other page references, e.g. -format=subfolder/format.html&-error=subfolder/error.html, etc. vs. -format=format.html&-error=error.html, etc.Viewing the source of our forms shows our paths and pages, anyway. We use FMP-u 5.5 so haven't had a chance to try that cdml_format_folder thing introduced in 6 yet.

--ST

This topic is 7519 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.