Webmastersite.net
Register Log In

Searchable Fields Error
Searchable Fields look in fields not selected

Comments on Searchable Fields Error

grumpybear
Beginner

Usergroup: Customer
Joined: Jan 21, 2006

Total Topics: 2
Total Comments: 4
Posted May 01, 2007 - 6:50 AM:

I have added some custom link fields to my site, one of which is holds the URL for an image. I have amended the search template to show the link and image which works well except for some links.

I have set the Searchable Fields setting to search only Title and Description but when I use the search function to search my site say using the word PINK it appears to be searching the custom fields as well even though they are not selected. I have also set it to not highlight this custom field.

The outcome of this is that any link with the word PINK in the URL for the image are being corrupted as WSN inserts the html code to highlight the word PINK in the URL.

Here is the code which causes the error, the output produced by WSN and I have also attached screenshot of the error and the search setting page.

<TABLE>
<TR>
<TD><A href="{TRACKLINKURL}"><img src="{LINKIMAGEURL}"</A></TD>
<TD>{LINKDESCRIPTION}</TD>
</TABLE>

<TABLE>
<TR>
<TD><A href="http://www.ukgift.co.uk/links/14/"><img src="http://www.a1gifts.co.uk/images/prodimages/<span class="searchhighlight">pink</span>-mouseL.jpg"</A></TD>
<TD></TD>
</TABLE>

Am I doing something wrong or is this a bug?

Thanks,

Steve

Attached Files:
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 02, 2007 - 4:36 PM:

The searchable fields option only controls what the simple search searches. To prevent search highlighting within specific fields go to Admin -> Settings -> Search -> "Exclude these custom fields from search highlighting".
grumpybear
Beginner

Usergroup: Customer
Joined: Jan 21, 2006

Total Topics: 2
Total Comments: 4
Posted May 09, 2007 - 2:21 AM:

As you can see from the screenshot attached, I have already done this and it does not exclude the field.

Steve
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 09, 2007 - 2:41 PM:

Fields aren't template variables, they're what the "add fields" page lists and phpmyadmin shows is in the database. I gather the field you don't want to search highlight here is the link description, so type "description" in the box.
grumpybear
Beginner

Usergroup: Customer
Joined: Jan 21, 2006

Total Topics: 2
Total Comments: 4
Posted May 10, 2007 - 3:55 PM:

DOH I had tried what you suggested but I didnt realise that the filed names are case sensative. I have corrected this and it is working as expected now.

Thanks for your help and sorry to have wasted you time.

Steve
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.