Page 1 of 1

Search module not displaying results

Posted: Sat Jan 31, 2015 4:45 pm
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

Re: Search module not displaying results

Posted: Sat Jan 31, 2015 5:09 pm
by calguy1000
have you re-indexed all content?

Re: Search module not displaying results

Posted: Sun Feb 01, 2015 1:28 am
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.

Re: Search module not displaying results

Posted: Mon Feb 02, 2015 4:24 pm
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?

Re: Search module not displaying results

Posted: Mon Feb 02, 2015 5:02 pm
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.

Re: Search module not displaying results

Posted: Mon Feb 02, 2015 8:42 pm
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.

Re: Search module not displaying results

Posted: Tue Feb 03, 2015 9:58 pm
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

Re: Search module not displaying results

Posted: Tue Feb 17, 2015 9:03 pm
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