Jump to content

strange error when searching


tc_855
 Share

Recommended Posts

When I do any search I see this errror

Error: Exception: Field does not exist: sidebar (in /var/www/wire/core/PageFinder.php line 248)

#0 [internal function]: PageFinder->___getQuery(Object(Selectors))
#1 /var/www/wire/core/Wire.php(271): call_user_func_array(Array, Array)
#2 /var/www/wire/core/Wire.php(229): Wire->runHooks('getQuery', Array)
#3 /var/www/wire/core/PageFinder.php(145): Wire->__call('getQuery', Array)
#4 /var/www/wire/core/PageFinder.php(145): PageFinder->getQuery(Object(Selectors))
#5 /var/www/wire/core/Pages.php(144): PageFinder->find(Object(Selectors), Array)
#6 [internal function]: Pages->___find('title|body|side...')
#7 /var/www/wire/core/Wire.php(271): call_user_func_array(Array, Array)
#8 /var/www/wire/core/Wire.php(229): Wire->runHooks('find', Array)
#9 /var/www/site/templates/search.php(19): Wire->__call('find', Array)
#10 /var/www/site/templates/search.php(19): Pages->find('title|body|side...')
#11 /var/www/wire/core/TemplateFile.php(125): require('/var/www/site/t...')
#12 [internal function]: TemplateFile->___render()
#13 /var/

I'm pretty sure that I haven't done anything to the core files or the search files themselves.

Here is what my search template looks like. Does anyone have any advice for me?

post-1416-0-89706900-1373433565_thumb.pn

post-1416-0-58479500-1373433571_thumb.pn

Link to comment
Share on other sites

The search.php file that comes with the default profile includes the following line:

$matches = $pages->find("title|body|sidebar~=$q, limit=50");

That error suggests to me that you don't have the sidebar field in any of your templates, so you should remove "|sidebar" from the search.php file and I think you should be fine.

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...