FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Search results blank...sometimes?? (search error blank page)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon9.gif  Search results blank...sometimes?? [message #163240] Tue, 12 October 2010 14:44 Go to next message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

Ok, so just installed FUD and love it. However, after setting up all of my categories and forums, getting an initial few users created, and generating the first few posts, there's a problem.

On SOME searches, the result is a blank page -- no errors on screen or in the activity or error logs. They seem to be tied to one of two select messages in the forums though.

For example:

I search (all forums or just an individual one) for "back office" or just "office" -- a term only contained in a single message in a single forum. Also, I've tried to search entire message or just titles, and both yield same result: an empty browser. And I mean empty! Here's the source code from the results page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>

Yet, if I search on a term NOT found in one of these troublesome posts, such as "IPv6", I get a proper forum result output.

What gives?? Thanks in advance.

--Nick
Re: Search results blank...sometimes?? [message #163244 is a reply to message #163240] Tue, 12 October 2010 19:34 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Sorry, I haven't seen this before.
Please check for errors in your forum's Error Log Viewer as well as the web server's error_log.
Re: Search results blank...sometimes?? [message #163245 is a reply to message #163244] Tue, 12 October 2010 20:11 Go to previous messageGo to next message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

I have checked the error log viewer -- it's empty. I've also re-indexed, but it made no difference. I will check the Apache error logs, as I see it happening more and more frequently now.

Dankie,

--Nick
Re: Search results blank...sometimes?? [message #163256 is a reply to message #163245] Wed, 13 October 2010 03:30 Go to previous messageGo to next message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

Ok, the server logs were helpful.

[Mon Oct 11 13:45:24 2010] [error] [client 10.34.33.100] File does not exist: /var/www/vhost/naospeedwagon/forums/adm/style/overlay.png, referer: https://naospeedwagon/forums/adm/index.php?S=&SQ=55c32f11fbfc6c1f34e010 3355925922

This appears NUMEROUS times in the log file. Interestingly enough, that file does not exist...nor does it exist on another installation that I have. Now...how do I fix this??
Re: Search results blank...sometimes?? [message #163265 is a reply to message #163256] Wed, 13 October 2010 12:00 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
just grab a blank.png from the net, rename it to overlay.png and place it in the folder if you wanna get rid of the error message - bandaid sollution, but it should work =)

The error you are seeing with the missing file has nothing to do with the search result though.


[Updated on: Wed, 13 October 2010 12:01]

Report message to a moderator

Re: Search results blank...sometimes?? [message #163266 is a reply to message #163265] Wed, 13 October 2010 14:11 Go to previous messageGo to next message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

There were a couple of other errors that were prevalent in the logs. The first had to do with the twitter field, and I applied the fix referenced elsewhere in the forums. However, there's a call to an undefined function that I'm seeing a lot of as well and it references searches.

PHP Fatal error: Call to undefined function mb_substr() in /var/www/vhost/naospeedwagon/forums/theme/default/search.php on line 1165, referer: https://naospeedwagon/forums/index.php?&SQ=1dbc1c5ef836af42dd1feb9ec318 ca1e

BTW, grabbed a png from the web so we can band-aid that one error from the logs and will check later. Thks, Ernesto, for the suggestion.

Re: Search results blank...sometimes?? [message #163267 is a reply to message #163266] Wed, 13 October 2010 14:39 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
That sounds like it could be your problem hehe

That is strange though, mb_substr is a builtin PHP function (http://php.net/manual/en/function.mb-substr.php)

Could you perhaps grab some of the code from your compiled search.php - should be located in WWW_ROOT/theme/THEMENAME/search.php - Search for mb_substr - It should look something like this:

/* Remove stuff in quotes */
	while (preg_match('!<cite>(.*?)</cite><blockquote>(.*?)</blockquote>!is', $body)) {
		$body = preg_replace('!<cite>(.*?)</cite><blockquote>(.*?)</blockquote>!is', '', $body);
	}

	$body = strip_tags($body);
	if (strlen($body) > $GLOBALS['MNAV_MAX_LEN']) {
		$body = mb_substr($body, 0, $GLOBALS['MNAV_MAX_LEN']) . '...';
	}
	return $body;
}


The piece of code its complaining about is located in search_forum_sel.inc.t


[Updated on: Wed, 13 October 2010 14:39]

Report message to a moderator

Re: Search results blank...sometimes?? [message #163268 is a reply to message #163266] Wed, 13 October 2010 14:41 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
twnick wrote on Wed, 13 October 2010 16:11
BTW, grabbed a png from the web so we can band-aid that one error from the logs and will check later. Thks, Ernesto, for the suggestion.

I had 18 million entries of missing blank.gif once. That was a nice log


Re: Search results blank...sometimes?? [message #163269 is a reply to message #163268] Wed, 13 October 2010 15:06 Go to previous messageGo to next message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

Here's what's in the file:

function trim_body($body)
{
/* remove stuff in old bad quote tags - remove in future release */
while (($p = strpos($body, '<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td class="SmallText"><b>')) !== false) {
if (($pos = strpos($body, '<br></td></tr></table>', $p)) === false) {
$pos = strpos($body, '<br /></td></tr></table>', $p);
if ($pos === false) {
break;
}
$e = $pos + strlen('<br /></td></tr></table>');
} else {
$e = $pos + strlen('<br></td></tr></table>');
}
$body = substr($body, 0, $p) . substr($body, $e);
}

/* Remove stuff in quotes */
while (preg_match('!<cite>(.*?)</cite><blockquote>(.*?)</blockquote>!is', $body)) {
$body = preg_replace('!<cite>(.*?)</cite><blockquote>(.*?)</blockquote>!is', '', $body);
}

$body = strip_tags($body);
if (strlen($body) > $GLOBALS['MNAV_MAX_LEN']) {
$body = mb_substr($body, 0, $GLOBALS['MNAV_MAX_LEN']) . '...';
}
return $body;
}

Re: Search results blank...sometimes?? [message #163270 is a reply to message #163269] Wed, 13 October 2010 15:15 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
What is the title of the threads/posts that show up as blank pages? Maybe there is the problem, I dunno.

Re: Search results blank...sometimes?? [message #163271 is a reply to message #163270] Wed, 13 October 2010 15:55 Go to previous messageGo to next message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

Here's one -- no obvious issues that I can see, but I'm open to any suggestions....

Category: General
-> Forum: Forum Feature Wish List
- --> Post Title: Back Office
Re: Search results blank...sometimes?? [message #163272 is a reply to message #163271] Wed, 13 October 2010 17:22 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Please apply this patch and rebuild your themes to activate it:
http://fudforum.svn.sourceforge.net/fudforum/?rev=5033&view=rev
Re: Search results blank...sometimes?? [message #163273 is a reply to message #163272] Wed, 13 October 2010 17:37 Go to previous messageGo to next message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

Dankie! How do I apply the patch?
Re: Search results blank...sometimes?? [message #163275 is a reply to message #163273] Wed, 13 October 2010 17:45 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
http://fudforum.svn.sourceforge.net/viewvc/fudforum/trunk/install/forum_dat a/src/search_forum_sel.inc.t?r1=5033&r2=5032&pathrev=5033

In your DATA_ROOT/src/ directory - locate search_forum_sel.inc.t



Re: Search results blank...sometimes?? [message #163276 is a reply to message #163273] Wed, 13 October 2010 17:59 Go to previous message
tw_nick   United States
Messages: 57
Registered: October 2010
Location: Dallas, TX
Karma: 0
Member

FIXED! Thanks for the quick help, folks. I've applied the patch, and it appears to have addressed the issue. However, I will be loading the mb_substr package during my next server maintenance window. I really appreciate the coaching from both of you.

naudefj, I owe you a dinner at Spur! Smile

(ernesto, sorry -- I haven't been to Sweden, so I can't reference any local restuarant chains...)

[Updated on: Wed, 13 October 2010 18:01]

Report message to a moderator

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: User Administration System: max 50 users displayed
Next Topic: Trying to register user gives blank page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 18 13:53:49 GMT 2024

Total time taken to generate the page: 0.02658 seconds