Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-19 18:12:03

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Search problem in 4.0.4

Hi guys, I have a strange problem when trying to retrieve search results, I am usingthis code:

<pre> <txp:if_search> <txp:chh_if_data> <h2>Search Results</h2> <ul class=“articleList”> <txp:article form=“searchResults” /> </ul> <txp:else /> <h2>No Results</h2> <p>Bugger… Didn’t find a damn thing.</p> </txp:chh_if_data> <txp:else /> <txp:if_article_list> <txp:article section=“Blog” limit=“1” /> <h3 id=“previouslyInBlog”>Previously In The Blog:</h3> <ul class=“hpRecently”> <txp:article_custom form=“hpRecentArticles” limit=“5” section=“Blog” /> </ul> <txp:else /> <txp:article section=“Blog” limit=“1” /> </txp:if_article_list> </txp:if_search>
</pre>

Try it on http://belgrade.org.yu/

It’s spitting out a “tag_error <txp:article form=“searchResults” /> -> Textpattern Notice: form_not_found: search_results on line 1332” and I know that form exists and it is containing:

<pre> <li> <h2><txp:permlink><txp:title /></txp:permlink></h2> <txp:search_result_excerpt hilight=“strong” limit=“1” /> </li>
</pre>

Last edited by draganbabic (2006-10-19 18:15:30)

Offline

#2 2006-10-19 21:25:38

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Search problem in 4.0.4

Are you sure the form name is spelled the same?


Alex

Offline

#3 2006-10-20 10:36:22

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: Search problem in 4.0.4

Absolutely, checked thoroughly

Offline

#4 2006-10-26 03:21:41

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Search problem in 4.0.4

I take it this is no longer a problem, or did you revert to 4.0.3?

Offline

#5 2006-10-26 08:27:10

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: Search problem in 4.0.4

I forgot to post the solution here: even though I was telling TXP to use the form searchResults for my search results listing – I had to rename my form to search_results (is this the default?) for it to work.

Offline

#6 2006-10-26 08:48:31

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Search problem in 4.0.4

Yes, “search_results” is the default, but, it should use whatever form you specify.

Offline

#7 2006-10-26 08:50:48

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: Search problem in 4.0.4

Well unfortunately, this is what I had to do, and I forgot to mention – I didn’t revert to 4.0.3, I’m on 4.0.4.

Offline

#8 2006-10-26 22:33:43

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Search problem in 4.0.4

You have to use searchform="myform" to override the form used for search results.


Alex

Offline

Board footer

Powered by FluxBB