Search string too long, giving blank result

Posted:
Sat Apr 19, 2008 3:43 am
by corestat.consulting
Hello!
Some of my table's search action gives blank search result page, becouse it is using too long search string:
http://wififalu.com/wifi/index.php?-tab ... res%C3%A9s
Instead of just:
http://wififalu.com/wifi/index.php?-act ... Ajk%C3%A9r
Is it possible to fix the blank result or change it not to search by all the variable just the ones with i have given a value?
Thanks
Benedek Rakovics

Posted:
Sat Apr 19, 2008 4:09 am
by corestat.consulting
On my other server its working perfectly, when i search it gives this URL
http://tesztwififalu.corestat.hu/wifi/i ... Ajk%C3%A9r
I don't know what could be the problem, becouse i belive there is no difference in the config file.

Posted:
Sat Apr 19, 2008 7:38 am
by shannah
Hi Benedek,
The blank page indicates that there is an error that is not being displayed.
If you have access to the apache error log you can see what this error is.
Otherwise, you should enable errors by adding the following to the beginning of your index.php file:
- Code: Select all
ini_set('display_errors','on');
error_reporting(E_ALL);
GET

Posted:
Sat Apr 19, 2008 8:11 am
by corestat.consulting
Hello!
Thank you for your reply. I haven't found any errors in the error log. If you need any information that might help, please let me know.
My index.php looks like this:
- Code: Select all
<ob_start>display();
?>

Posted:
Sat Apr 19, 2008 8:13 am
by corestat.consulting
I doesnt't let me post it...
<? ob_start();
error_reporting(E_ALL);
ini_set('displaly_errors','on');
define('DATAFACE_INSTALLATION_PATH', '/home/wififalu/public_html/api');
define('DATAFACE_INSTALLATION_URL', 'http://www.wififalu.com/api');
ini_set('session.save_path', '/home/wififalu/tmp');
$sessionpath = session_save_path('/home/wififalu/tmp');
require_once '/home/wififalu/public_html/api/dataface-public-api.php';
df_init(__FILE__, 'http://www.wififalu.com/api');
$app =& Dataface_Application::getInstance();
$app->display();
?>

Posted:
Mon Apr 21, 2008 11:28 am
by shannah
Does it show this bloated url in the address field of your browser?
(
http://wififalu.com/wifi/index.php?-tab ... %5B%5D=Abaújkér&-findq%3Aminoseg_status=&-findq%3Aminoseg_datum=&-findq%3Aellenor=&-findq%3Ajavitas_status=&-findq%3Ajavitas_date=&-findq%3Afelelos=&-findq%3Aszolgaltato_nev=&-findq%3Astatus=&-findq%3Amodositva=&--submit=Keresés)
The find form is supposed to use the "POST" method. Xataface then processes this response and redirects to the correct url
(
http://tesztwififalu.corestat.hu/wifi/i ... Ajk%C3%A9r )
So it is very strange if the bloated URL actually shows up in the address bar.

Posted:
Sun Apr 27, 2008 10:29 pm
by shannah
That is bizarre. If you look at the HTML source for the find form, can you check to see the "method" attribute of the FORM tag? It should be "POST". If it is GET, then... something is fishy.
Have you upgraded Dataface from a previous version or is this version the first you have installed. If you have upgraded from a previous version it might be a template caching issue. You should clear the contents of the templates_c directory (in both your application directory if it exists, and the xataface/Dataface directory) to clear the cache.

Posted:
Mon Apr 28, 2008 1:41 am
by corestat.consulting
<form>
I'm using Dataface 071. I'll try to clean the template_c directory. Where can I find the form action in the source code?

Posted:
Mon Apr 28, 2008 1:41 am
by corestat.consulting
<form action="/wifi/index.php" method="get" name="onkormanyzat" id="onkormanyzat">

Posted:
Mon Apr 28, 2008 2:44 am
by corestat.consulting
The Form method is the same (GET) on my two applications (on different servers), however on the new server, the bloated URL shows up, with blank page, the other one gives out the results and only shows up:
http://tesztwififalu.corestat.hu/wifi/i ... Ajk%C3%A9r
Unlike on the new one:
http://wififalu.com/wifi/index.php?-tab ... res%C3%A9s

Posted:
Mon Apr 28, 2008 2:51 am
by corestat.consulting
Cleaning the templates_c did not help.

Posted:
Mon Apr 28, 2008 8:47 am
by shannah
Oh.. 0.7.1... Fix this issue by opening the Dataface/SearchForm.php file, and changing line 81 from:
- Code: Select all
parent::HTML_QuickForm($tablename, 'get');
to
- Code: Select all
parent::HTML_QuickForm($tablename, 'post');

Posted:
Mon Apr 28, 2008 9:41 am
by corestat.consulting
Yes! It's working now, thank you
