Elgg 1.7.7 autocomplete not working unexpected token '<' in json results

Hi everybody,

I'm using Elgg 1.7.7 (and i've also tried to substitute autocomplete files with 1.7.8 ones) and i'm trying to use the default elgg autocomplete input...it doesn't work... when i type something in the input box, the loding gif is shown, but no results are found; the browser (both chrome and firefox) shows a syntax error in the JS code due to the '<', maybe because the var wants a string:

Error: syntax error

var info = <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;;

the above code is generated by this line of code in the standard elgg view file input/autocomplete.php

eval("var info = " + row + ";");

the row var is the result of the search performed by the autocomplete and should be in json format, i cannot figure out why i get as reply that line!!!!

I've tried to visit the autocomplete page pg/autocomplete?&match_on.. after commented the exit statements in the code and putting some echo, but i've been immediately forwarded to the home, as if the autocomplete page doesn't exist...

Does someone got the same error? or better, is someone able to use the autocomplete in 1.7.7?

Thank you everybody!

  • SOLVED

    That was a stupid issue...

    the autocomplete url was set to pg/autocomplete, but there is no page handler registered for that page, the autocomplete handler is registered as livesearch, so it's just needed to change the url into the input/autocomplete.php file to pg/livesearch or to change the page handler from livesearch to autocomplete in the file engine/lib/input.php

    Now i'll report to the trac