Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Weird search issues, some searchs work others cause errors, repeatable


Go to End


2136 Views

Avatar
Howard

Community Member, 215 Posts

28 January 2009 at 10:51pm

Hi Guys,

I am setting up a site that has search and currently have it setup in prettty much the same way as the tutorial however when I search some words such as "Honda" which is included in pages it causes the error "Fatal error: Call to a member function XML_val() on a non-object in /tmp/silverstripe-cache-var-www-vhosts-jdmnz.com-httpdocs-dev/.cache.var.www.vhosts.jdmnz.com.httpdocs.dev.themes.jdmnz.templates.Layout.Page_results.ss on line 48"

However if I search for "ascot" which also is in title and content of pages then the search works perfectly.

If I search for "ijncpj" (ie something random) then it acts as it is supposed to and says "No products found"

Very strange....

The site is up at www.jdmnz.com/dev if anyone has a chance to have a look.

My Page_results.ss is here: http://pastie.org/373033
and my Page.php containing the search function is here:http://pastie.org/373018

I don't know how to troubleshoot this one...