Help - Search - Members - Calendar
Full Version: Blog search error
Movable Type Community Forum > Additional Resources > Tips and Tricks
doggone
I am using MT 2.51 and search has been working, now it is not. I am getting the following error: "Can't call method "id" on an undefined value at lib/MT/App/Search.pm line 158

I checked to make sure that search.pm was where it's supposed to be and it is.

Here is the link to my blog
Uncommon Thought Journal

I don't know if search has messed up or whether the index on my archive has gotten messed up or what.

Thanks in advance for your suggestions.
girlie
Have you experienced any other strange behavior with MT or your blog?

That error message makes me a bit nervous, because it could potentially be a hint about database corruption.

Here's the line of code:

CODE
   $ctx->stash('blog_id', $blog->id);


So $blog is the "undefined value", but similar code is called elsewhere in your blog (such as at login, etc.) - so I'm just wondering why it might balk in one place but not another.
doggone
I'm not sure why the search stopped working. I may have corrupted my own data base as I had some entries without titles (dumb me). I fixed that and replace my search code with the following:

CODE
<form method="get" action="http://www.uncommonthought.com/cgi-bin/mt-search.cgi">
<label for="search" accesskey="4">Search this site:</label><br />
<input id="search" name="search" size="20" /><br />
<input type="submit" value="Search" />
</form


Now it seems to work.
Thanks for your response and hope this helps someone else out
markpasc
This sounds like the error I got when I had done something silly like:

CODE
<input type="hidden" name="IncludeBlogs" value="2,4">

instead of:

CODE
<input type="hidden" name="IncludeBlogs" value="2">
<input type="hidden" name="IncludeBlogs" value="4">
almuhajabah
I'm having a sort of related problem. My regular blog search works fine, but I get an error about undefined values when attempting to do the new comments search.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.