pisearch module - duplicates & show_in_menu issue [SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
qbrix
Forum Members
Forum Members
Posts: 24
Joined: Fri Nov 10, 2006 7:56 pm

pisearch module - duplicates & show_in_menu issue [SOLVED]

Post by qbrix »

So I went back to the pisearch module to see if I could fix this problem:
http://forum.cmsmadesimple.org/index.php/topic,11442.0.html

Fixing the duplicates was easy, I just appended the following at the SQL string (around line 324 for v1.7):
AND p.content ''

Then what I wanted was for the search to look inside pages that weren't in the menu. By default the pisearch module doesn't search these pages. So I removed the following from the SQL string:
AND c.show_in_menu = 1

But then everything went crazy. It showed a blank screen for the results, and sometimes it would give me a memory overflow error. It took me some time to understand what was wrong because first of all, its a simple SQL change, it shouldn't cause problems, and second none of the code is commented.

Long story short, apparently since the Pisearch page (which gives the results) wasn't in the menu, it wasn't included in the search, but now that it is it would cause the module to go bonkers. So I just explicitly filtered it out from the SQL string:
AND c.content_name 'Pisearch'

enjoy
Post Reply

Return to “CMSMS Core”