URI disallowed characters + Lucence Search |
[eluser]weetstraw[/eluser]
Hello, I am using the Lucene search feature as explained on andrewrowland.com. When I type a search into the field, #quickresult returns the URI disallowed characters error. Does anyone know why this is happening? Search Controller Code: function result() In the View Code: <form method="post" action="<?php echo base_url(); ?>search/result"> Search JS Code: $(document).ready(function(){ .htaccess Code: DirectoryIndex index.php
[eluser]bretticus[/eluser]
Is there a reason your javascript is posting to menuResult instead of result ? Code: $.post("<?php echo base_url(); ?>search/menuResult", {search_query: $(e.target).val()},
[eluser]bretticus[/eluser]
If you don't have firebug installed already, get it and install it. In the "net" tab you should be able to see these requests. What is the URL being submitted by the javascript?
[eluser]weetstraw[/eluser]
For search.js: Response Headers Date Wed, 16 Sep 2009 20:18:54 GMT Server Apache/2.2.8 (Win32) PHP/5.2.6 Connection Keep-Alive Keep-Alive timeout=5, max=100 Etag "20500000001a7f8-208-473b67b7a7d38" Request Headers Host localhost User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Accept */* Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive Referer http://localhost/wrt-demo/people/title/1 Cookie ci_session=a:4:{s:10:"session_id";s:32:"c4abb47a1973c742a04df29d2af3071e";s:10:"ip_address";s:9:"127.0.0.1";s:10:"user_agent";s:50:"Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv";s:13:"last_activity";s:10:"1253132310";}62792c59e48ee1d7b07f63297f390e80 If-Modified-Since Wed, 16 Sep 2009 18:58:19 GMT If-None-Match "20500000001a7f8-208-473b67b7a7d38" Cache-Control max-age=0
[eluser]bretticus[/eluser]
Have a look at the actual request line in firebug that shows where the POST was sent (you can mouse over it or click on it to get the full url.) I suspect there is a query string.
[eluser]weetstraw[/eluser]
Got it! Stupid mistake... in this line Code: $.post("<?php echo base_url(); ?>search/menuResult", {search_query: $(e.target).val()}, I was echoing out the base_url() BUT it's a JS file. This code used to be on a PHP page and I just copy/pasted it to a js file. Thanks again! |
Welcome Guest, Not a member yet? Register Sign In |