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.
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".
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.
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
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Searchable Fields Error
Beginner
Usergroup: Customer
Joined: Jan 21, 2006
Total Topics: 2
Total Comments: 4
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:
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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".
Beginner
Usergroup: Customer
Joined: Jan 21, 2006
Total Topics: 2
Total Comments: 4
As you can see from the screenshot attached, I have already done this and it does not exclude the field.
Steve
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Beginner
Usergroup: Customer
Joined: Jan 21, 2006
Total Topics: 2
Total Comments: 4
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