Search Issue

Search Issue, a forum discussion on Jojo CMS. Join us for more discussions on Search Issue on our Suggestions & Feedback forum.

Back to Forum Index : Back to Suggestions & Feedback   RSS
rhcarter

16 Nov 2011
Posts: 27

Hi Guys,
Not sure where I should put bug reports but here it is.

I accidentally put a ? into the search box on one of my sites and got raw code on the page - this happens on the search engine on this site as well....

Input Array does not match ?: SELECT `pageid` AS id, `pageid`, ((MATCH(pg_title) AGAINST ('?') * 0.2) + MATCH(pg_title, pg_desc, pg_body) AGAINST ('?')) AS relevance FROM page WHERE ((0 OR pg_title LIKE '%
Input Array does not match ?: SELECT `id` AS id, `id`, ((MATCH(business) AGAINST ('?') * 0.2) + MATCH(business, postal_line1, postal_line2, postal_line3, postal_line4, postal_country, physical_line1, physical_line2, physical_line3, physical_line4, physical_country, contact_title, contact_firstname, contact_lastname, tech_firstname, tech_lastname) AGAINST ('?')) AS relevance FROM distributor WHERE ((0 OR business LIKE '%
Input Array does not match ?: SELECT `productid` AS id, `productid`, ((MATCH(name) AGAINST ('?') * 0.2) + MATCH(name, longdescription) AGAINST ('?')) AS relevance FROM product WHERE ((0 OR name LIKE '%
Input Array does not match ?: SELECT `resourceid` AS id, `resourceid`, ((MATCH(title) AGAINST ('?') * 0.2) + MATCH(title, description) AGAINST ('?')) AS relevance FROM resource WHERE ((0 OR title LIKE '%
Input Array does not match ?: SELECT `videoid` AS id, `videoid`, ((MATCH(title) AGAINST ('?') * 0.2) + MATCH(title, description) AGAINST ('?')) AS relevance FROM video WHERE ((0 OR title LIKE '%
Input Array does not match ?: SELECT `testimonialid` AS id, `testimonialid`, ((MATCH(tm_name) AGAINST ('?') * 0.2) + MATCH(tm_name, tm_body) AGAINST ('?')) AS relevance FROM testimonial WHERE ((0 OR tm_name LIKE '%

Love to have a fix for it - I will keep looking myself but thought i should flag it.
Roger
tom

Developer

tom

17 Nov 2011
Posts: 379

Not seeing that on the current svn copy - are you running the 1.0 tag?
rhcarter

17 Nov 2011
Posts: 27

Hi Tom,
I would love to know the answer to that. I thought I was using 1.0.0 which I downloaded again recently as a check but version.txt in most of the dirs is 1.0rc1. It also states it is 1.0rc1 when you run setup.

I solved the problem by adding an extra line into the jojo_search.php

/* Remove dashs from url rewriting */
$keywords = urldecode(str_replace('-', ' ', Jojo::getFormData('q', '')));

this eliminates the question marks :-
$keywords = urldecode(str_replace('?', '', Jojo::getFormData('q', '')));

Just try putting a question mark into the search box on this site and you will see what I mean.
Roger
tom

Developer

tom

18 Nov 2011
Posts: 379

Search has had quite an overhaul since the 1.0 release. we're hoping to do another release soon that will include that (and a large number of other improvements), but the current development version is actually very stable at the moment, so you could download an svn checkout of that from
http://svn.jojocms.org/branches/jojo1.0/
if you have svn.
Back to Forum Index : Back to Suggestions & Feedback   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.