Since Evo 1.0.5 I've problems with AjaxSearch.
In 2 different webservers, with different configurations, AjaxSearch can't do any search, everytime I get an Error 500 - Internal Server Error on both LAMP and WAMP systems.
No other scripts nor plugins seem to cause this, I've tracked back the code which causes the script to hang till time limit to the query that does the true search.
The search hangs exactly on this query, sent to db in AjaxSearchRequest.class.inc.php at line 65:
SELECT sc.id,
sc.pagetitle,
sc.longtitle,
sc.description,
sc.alias,
sc.introtext,
sc.template,
sc.menutitle,
sc.content,
sc.publishedon,
GROUP_CONCAT( DISTINCT CAST(ntv.id AS CHAR) SEPARATOR "," ) AS tv_id,
GROUP_CONCAT( DISTINCT ntv.value SEPARATOR "," ) AS tv_value
FROM `modx_site_content` sc
LEFT JOIN `modx_document_groups` dg
ON sc.id = dg.document
LEFT JOIN( SELECT DISTINCT tv.id, tv.value, tv.contentid FROM `modx_site_tmplvar_contentvalues` tv ) AS ntv
ON sc.id = ntv.contentid
WHERE ((sc.published=1)
AND (sc.searchable=1)
AND (sc.deleted=0)
AND ((dg.document_group IN (5)) OR (sc.privateweb=0)))
GROUP BY sc.id
HAVING
((
(sc.pagetitle LIKE '%SearchTerm%')
OR (sc.longtitle LIKE '%SearchTerm%')
OR (sc.description LIKE '%SearchTerm%')
OR (sc.alias LIKE '%SearchTerm%')
OR (sc.introtext LIKE '%SearchTerm%')
OR (sc.menutitle LIKE '%SearchTerm%')
OR (sc.content LIKE '%SearchTerm%')
OR (tv_value LIKE '%SearchTerm%')
))
ORDER BY sc.publishedon,sc.pagetitle
Trying the query in phpmyadmin gets it out of script time and gives an Error 500 - Internal Server Error too, so this is the problem.
MySQL version is 5.0.51a-24+lenny5.
I've lots of tvs, thanks to YAMS (but YAMS itself isn't the problem).
Am I the only one?
[ed. note: kudolink last edited this post 13 years ago.]