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.

Template Questions

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


Reply

1127 Views

Avatar
Howard

28 January 2009 at 10:51pm Community Member, 215 Posts

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 [url]www.jdmnz.com/dev[/url] if anyone has a chance to have a look.

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

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