Search module not displaying results

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
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Search module not displaying results

Post by jraderma »

I have recently upgraded a site from 1.9.x to 1.11.12. Somewhere between the 1.11.11 and the 1.11.12 versions, no search results are appearing on my results page. Part of my upgrade process b/t 1.11.11 and 1.11.12 included going from PHP5.3 to 5.4, updating CGExtensions all the way to 1.45, which required the addition of the CGSimpleSmarty 1.7.4. Complete system info is at the bottom of my post.

This is my tag in my site template:

Code: Select all

{search resultpage='search-results'}
This is what I get on my results page:

"0 results for "" returned:
No Results Found!"

This is my URL when I search for "membership"

Code: Select all

<path>/index.php?mact=Search%2Ccntnt01%2Cdosearch%2C0&cntnt01returnid=222&cntnt01searchinput=membership&submit=go&cntnt01origreturnid=221
For fun, I put a few things in the results template to see if any information was being returned from action.dosearch.php:

Code: Select all

{$searchwords|@print_r}<br>
{$phrase}<br>
{$timetook}<br>
{$itemcount}<br>
{$results|@print_r}<br>
And this is what shows up on my screen:

Array ( ) 1

0.004657
0
Array ( ) 1

All variables are empty except for $timetook. It's as if action.dosearch.php just jumps straight to the else statement on line 302.

I'm stumped and any help would be appreciated!
-Jon


SYSTEM INFO:
Cms Version: 1.11.12

Installed Modules:

CMSMailer: 5.2.2
FileManager: 1.4.5
MenuManager: 1.8.6
ModuleManager: 1.5.8
News: 2.14.4
Printing: 1.1.2
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
CGExtensions: 1.45
jQuery: 1.2.0
FormBuilder: 0.8.1.1
Captcha: 0.5.0
CGCalendar: 1.14.6
youtubeplayer: 1.3
CMSPrinting: 1.0.5
MicroTiny: 1.2.8
CGSimpleSmarty: 1.7.4

Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 64000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:

phpversion: 5.4.36
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 300M
max_execution_time: 200
output_buffering: 0
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 65M
upload_max_filesize: 64M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.1.39
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Search module not displaying results

Post by calguy1000 »

have you re-indexed all content?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: Search module not displaying results

Post by jraderma »

calguy1000 wrote:have you re-indexed all content?
I'm not able. Even though I set my PHP timeout to 200 and on a VPS with 300MB of memory available, I always get a 500 server error when I try to re-index after about two minutes. I was hoping that there might be a way to re-index via command line thinking that it would hold out until re-indexing completed.
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: Search module not displaying results

Post by jraderma »

Or perhaps there is an SQL statement I can execute to re-index my content?

Or is there something I could pare down in my DB to lighten the re-indexing load?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Search module not displaying results

Post by calguy1000 »

You can disable modules, or mark pages as not searchable, then the re-index won't have much to search on.

But re-enabling the module will not cause the data from those modules to be added to the search index. You would literally have to visit each article (i.e: calendar event or news article etc). to add them individually to the search index.

Your better bet would be to figure out what is causing the 500 error (review your logs). and if possible, fix that.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: Search module not displaying results

Post by jraderma »

Your better bet would be to figure out what is causing the 500 error (review your logs). and if possible, fix that.
Thanks for the suggestion. This is what I got when my 500 error occurred (I've got a copy of the live site in the "sandbox" folder):

Code: Select all

[Mon Feb 02 12:32:03 2015] [error] [client <IP addy>] Premature end of script headers: moduleinterface.php, referer: http://<URL>/sandbox/admin/moduleinterface.php?_sx_=1fe5d861672dbfdd&module=Search
This is with max_execution_time = -1. I had a shell open with top -c running and noticed that available memory was at 400MB and while the re-indexing was occurring, memory usage hovered around 250MB. At any given moment, the site is using ~200MB of memory.
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: Search module not displaying results

Post by jraderma »

Robert,

I took a different approach. I cloned my site and installed it on a local machine running MAMP. Given the unfettered resources, it was able to re-index the site in less than 30 seconds. Now, can I export the four "module_search_" tables out of the local DB and upload them to my live site? If that will work, which ones should I import?

Thanks-
Jon
jraderma
Forum Members
Forum Members
Posts: 18
Joined: Sat Jan 24, 2015 10:53 pm

Re: Search module not displaying results

Post by jraderma »

I am at total loss at this point. After my February 3 post, I uninstalled the search module and reinstalled it. Looks like during the reinstall, it re-indexed from the looks of the table in the DB.

Still the search function returns:

Search Results For ""
No Results Found!

Can anyone please help?

Thanks-
Jon
Post Reply

Return to “CMSMS Core”