Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-15 13:10:57

progre55
Member
Registered: 2006-05-02
Posts: 668

Search Functionality Assistance

I have used the TXP search functionality on other sites without a problem. But for some reason, I am not able to get the search functionality to work on my current site project.

To give some background of the problem.

  • I am using Textpattern · 4.0.6
  • I have already reviewed and double checked the FAQ
  • On this site I am using Nathan Arthur’s tru_tags plug in (which uses TXP search) and it works fine.
  • In addition, I am using Gerhard’s Custom Field plug in and that search works fine. I know it works a little differently, but it works.

The code I am using for the form is:

<txp:search_input label=“Search” button=“Search” size=“15” wraptag=“p” />

The code I am using for the results are:

<txp:if_article_list>
<txp:if_search>
<txp:article sortdir=“asc” sortby=“Title” limit=“10” /> Test Search 1234
<txp:else />
Search Test
</txp:if_search>
</txp:if_article_list>

Now it runs the search (I see my message “Test1234”), but no results (articles) are returned and I know that there are articles that fit the criteria. I am stumped. Like I mentioned above, the section is set to allow searching.

Again, I am sure it is something that I am overlooking, but I think I have looked everywhere with no success.

Any and all insight and guidance would be appreciated.

progre55

Last edited by progre55 (2008-08-15 13:12:34)

Offline

#2 2008-08-15 14:12:51

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Search Functionality Assistance

In your article tag, the attributes “sortdir” and “sortby” have now been replaced by the single attribute “sort” so you need to use sort="Title asc". I don’t know if that sorts the problem. Also I’m not sure why you have the <txp:if_article_list> tags around it??

Last edited by thebombsite (2008-08-15 14:13:18)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2008-08-15 14:28:14

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Search Functionality Assistance

thebombsite:

Sorry for the mistakes in the code. When I started to have difficulty, I copied and pasted some ideas from older sites.

I tried again, pulling the “sort” and also the artcile list tag, but still no luck.

Do you have any other ideas on where I may look or what I can test to see what may be the problem.

A copy additional things to add to the equation that may help:

If I run a search, and use the following code:

<txp:search_result_date />

It returns the message: a few seconds ago

I am not quite sure, but thought it may be useful information …

Also, and I am not sure if this helps, but I pulled the exact same code I am trying and put it into another site and it worked perfectly. That got me to thinking, the only “real” difference is that in my current project the site is in a sub directory wwww.websitedevelopment.com/testing/ …

For the search to work properly, does it have to be at the root level ….

progre55

Last edited by progre55 (2008-08-15 15:24:07)

Offline

Board footer

Powered by FluxBB