Webmastersite.net
Register Log In

Search Function only Partially works
The search function on my site only works on some words.

Comments on Search Function only Partially works

RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
Posted Aug 20, 2011 - 2:18 PM:

The search function on my site doesn't work for all search terms. In other words, you can search for a state by full name and get good results. Search my site for one of the "listing types" and it doesn't work. I have 4 listing types; Restaurant, Bar/Tavern, Retailer and Brewery and of those 4 only the bar/tavern type shows up correctly on a search. It is an odd error to us and we have been trying to track it down for 3 days with no luck so far. Any help would be most appreciated.

Oh, you are also supposed to be able to click on an Advanced Search on the front page and open an Advanced Search box which also does not work. I realize the two are probably not related just more search issues that we are having.

Still have not answered how to fix the meta tag issue that was messed up by hard coding on my site. I deleted the hard coded meta tags but what else needs to be done? SEO is obviously extremely important.
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 22, 2011 - 12:50 PM:

In the simple search, only the fields you select at Admin -> Settings -> Search are searchable -- and they match only according to the criteria you select there.

Not sure I understand your listing type problem. Are you talking about types not displaying on the search results page, or not being able to enter the name of a type and have a result match? Also I checked and it looks like you have 7 types not 4, and they aren't the types you said above, so I'm confused as to what you're talking about.

If you can't click "Advanced Search" that would be problem with your template customizations in which you've somehow unlinked it, or broken html elsewhere in your wrapper template makes browsers not process the link correctly -- an HTML validator like http://validator.w3.org will help you find the problem in the latter case.
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 22, 2011 - 12:59 PM:

Also as for the advanced search link, it looks like it's been changed into some sort of complicated javascript which is broken. Why not just use <a href="search.php">Advanced Search</a>?
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
Posted Aug 22, 2011 - 12:59 PM:

Thanks Paul.

I see where you are referring me in the Admin. My next question given your response is, is what I am wanting to search for (Restaurant, Bar/Tavern, Retailer, Brewery) a listing type or would it be called something else. Actually, two of the 4 do work so I think the problem lies somewhere else other than in the settings since some of them work. Any ideas?

I will check the w3 validator and see if that helps me get the link back working for the Advanced Search.
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 22, 2011 - 1:02 PM:

I was editing my above posts while you were posting, so check the changes above that reflect my increasing confusion. And the w3 validator won't help with the advanced search since it appears to be javascript that's broken instead of html. Unless you need a popup window or something, just remove the javascript.

When I say "listing type", that means the things listed at Admin -> Settings -> Type Manager. What do you mean by it?
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
Posted Aug 22, 2011 - 1:13 PM:

www.glutenfreebeerisnear.co...lled=1&whichtype=links

Here is a link to an example of the problem and maybe from this you can tell what is wrong. Terminology is definitely a problem as I don't really understand the terminology of WSN as all, which is why it is easier for me to show you instead of trying to explain it. :-) Looking at you directions to what you refer to as type is all the ads that are offered on the site, has little (almost nothing) to do with listings. I don't know what you call what I am looking for but maybe your looking at the link will help us both understand. Thanks again!

The javascript I am guessing was to pull a portion of the search.php into the same front page instead of going to the whole search.php page. That was written by the first programmer and was working fine. I am sure it got messed up by the last programmer if it is javascript based. Knowing it is javascript at least narrows it down for me so it shortens my search. :-)
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Aug 23, 2011 - 10:26 AM:

Okay it appears it's the btype field you're looking at. The template code you have for that is <select name="btype" class="mainselect">... which won't do anything. To search any field you need a condition field and a search field. Your selector should be the search field and the condition field should be =. So, <input type="hidden" name="btypecondition" value="=" /><select name="btypesearch" class="mainselect">

If you want to pull a portion of the search form into the main page, just copy the html form over from the advanced search template to the main index template and then remove the undesired parts of the form.
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
Posted Aug 23, 2011 - 11:27 AM:

Thanks Paul, got the Advanced search working yesterday on the front page again. When you told me it was javascript I knew immediately what had happened so that made it easier to fix. We realized that we were looking for the btype but having the additional information I am sure will be most helpful. I will update you on our results, as of right now we had hit a stone wall so your information will probably make the difference. :-)
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
Posted Aug 23, 2011 - 5:56 PM:

Okay Paul, is this code better?

<form action="search.php?filled=1&amp;whichtype=links" method="post">
<input type="hidden" name="btypecondition" value="=" ><select name="btypesearch" class="mainselect"><option value="Restaurant">Restaurant</option><option value="Bar/Tavern">Bar/Tavern</option><option value="Retailer">Retailer</option><option value="Brewery">Brewery</option></select>
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
#10 - Quote - Permalink
Posted Aug 24, 2011 - 8:04 AM:

^ That looks almost right, except you can only search specific fields like that with an advanced search, and you used the <form> tag of the simple search. <form action="search.php?action=filter&filled=1&whichtype=links" method="post"> would be right
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
#11 - Quote - Permalink
Posted Aug 25, 2011 - 9:39 AM:

What would be the right tag to use for the Advanced search instead of <form>? If I am understanding what you are saying, the search isn't going to work properly with the <form> tag or with the code you gave it will work?
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
#12 - Quote - Permalink
Posted Aug 26, 2011 - 5:56 PM:

It's still is not working right Paul. What is your suggestion?
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
#13 - Quote - Permalink
Posted Aug 29, 2011 - 1:58 AM:

Use the from tag I gave you above in post #10.

In general terms, simply copy and paste the advanced search form from the advanced search template and remove undesired fields. If you do that it will always work.
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
#14 - Quote - Permalink
Posted Aug 31, 2011 - 11:27 AM:

We have used the code you gave but it has no effect on the btype search. Still not working but again, every search works except for btype.
RockinDoubleJ
Member

Usergroup: Member
Joined: Jul 29, 2011

Total Topics: 6
Total Comments: 34
#15 - Quote - Permalink
Posted Sep 03, 2011 - 11:21 PM:

Still waiting on a reply. All searches are working except for btype; no btype search works at this time.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.