1
technigrafa
Content module not returning in searches

I am using the Content module 0.5 with the fckeditor built in and when I search my XOOPS site, the content module doesn't produce any results, when I know the words I am searching for are in content pages.

I am seeing this on 2.0.13.2 as well as 2.0.14. The wierd thing is one (out of many) of the sites we did actually does work! And they are on an identical setup - same server, etc.

Any ideas? Anyone else using the Content module out there experiencing problems?

2
zyspec
Re: Content module not returning in searches
  • 2006/7/15 14:44

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


You can change lines 42-44 in /include/search.inc.php from:

if ( $userid != ) {
  
$sql .= " AND storyid='0' ";
}


to:

//if ( $userid != 0 ) {
//  $sql .= " AND storyid='0' ";
//}


- that should fix the problem.

3
technigrafa
Re: Content module not returning in searches

Thanks for your help!

I tried that and, unfortunately, it it's still not working.

You can test it at:
http://www.servicesoars.com

4
carnuke
Re: Content module not returning in searches
  • 2006/7/15 19:35

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Yep, your're right it failed to find a search string. So I tested on my sites and ... likewise it failed to find search strings. I usually dont bother to test this, but now I see there is a problem. Davinci is not around much ATM, so we're going to have to fix this somehow
http://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

5
zyspec
Re: Content module not returning in searches
  • 2006/7/15 20:23

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


The above is a problem...but apparently there must be additional issues. I'll dig further when I get a chance...

6
zyspec
Re: Content module not returning in searches
  • 2006/7/15 20:54

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Okay - I found another problem.

Replace "main.php" in lines 34-37 with "modinfo.php".

This will load _MIC_CONTENT_PREFIX constant - which it's not doing right now so it's not finding the 'content' table in the database.

I don't see anything else obvious - if this doesn't work then I'll install the module and look more...

7
technigrafa
Re: Content module not returning in searches

Thanks again for your help. This didn't solve the problem either, I'm afraid. I really appreciate your help!

8
zyspec
Re: Content module not returning in searches
  • 2006/7/15 22:26

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Hmmm... I loaded it on my 2.0.14 site and it works. Maybe we can debug using a different approach.

Can you turn on debug and see what errors show up when you perform a search (and the SQL queries) and then post them back here or send me a PM if you'd prefer.

The SQL queries ought to look something like:

SELECT storyid, title, homepage, submenu FROM your_database_name_content WHERE homepage='0' AND submenu='1'

SELECT storyid, title, text FROM your_database_name_content WHERE visible='1' AND ((text LIKE '%your_search_string%' OR title LIKE '%your_search_string%')) ORDER BY storyid ASC LIMIT 0, 5

9
technigrafa
Re: Content module not returning in searches

Thanks so much for helping me diagnose this. Here's the SQL Debug (substituting in DBPREFIX for the DB name) As far as I know this is right-There weren't any PHP debug errors, only notices:
------------------------------------

SELECT storyid, title, homepage, submenu FROM DBPREFIX_content WHERE homepage='0' AND submenu='1'

SELECT storyid, title, text FROM DBPREFIX_content WHERE visible='1' AND ((text LIKE '%committed%' OR title LIKE '%committed%')) ORDER BY storyid ASC LIMIT 0, 5

Login

Who's Online

251 user(s) are online (167 user(s) are browsing Support Forums)


Members: 0


Guests: 251


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits