Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-05-30 20:00:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Search results disappeared

vickilh, there’s something commented out where the search results normally would appear:
Search for <!-- TXP List of articles in this section and later in the template there’s the closing -->,
(immediately before a <!-- txp:stw_category_tree prune="true" start="*s" / -->)

Move the closing part upwards so that it’s
<!-- TXP List of articles in this section -->

Last edited by uli (2013-05-30 20:03:52)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#14 2013-05-30 20:11:20

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: Search results disappeared

Ok, tomorrow!?

Offline

#15 2013-05-30 20:56:13

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: Search results disappeared

(criss-crossing in cyber-space) – Uli, I took out all that commented code around search results area earlier today. Now all of that looks like this:

	<div id="submenu">
<!-- TXP Section Name -->
	<h3><span><txp:page_url type="s" /></span></h3>					 
	</div>	
	<div id="contenttext" class="searchresults">
	<h3>Search Results</h3>
<!-- TXP Article -->
        <p><b>
  <txp:if_search>
        <txp:article pgonly="1" />
        <txp:search_result_count /></b></p>
	<txp:article sortby="Posted" sortdir="desc" form="search_results" />	
        </txp:if_search>		
	</div>

Offline

#16 2013-05-30 21:44:25

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: Search results disappeared

What’s interesting is that the search_result_count will produce a number for the count, the article tag just won’t output the articles. Article_custom will output the articles, but will also output unrelated articles.

In the meantime, I’ll change this to article_custom, just so the search sort of works. Thanks & be back in touch tomorrow! Vicki

Offline

#17 2013-05-30 22:09:47

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: Search results disappeared

Changing the tag back to article. Article_custom may be too confusing for patrons.

Offline

#18 2013-05-30 22:21:48

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Search results disappeared

I do not understand the problem, but here are a few comments on the following line:

<txp:article sortby="Posted" sortdir="desc" form="search_results" />

As I know, the attribute is only sort, and the default is “score desc” for search results (<txp.article>). In addition, there’s a searchform="" attribute for search results output.

I don’t know if that has an influence.

Offline

#19 2013-05-30 22:47:09

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: Search results disappeared

Good catch! I made the changes, but problem still there – no output of search results.

<txp:article sort="Posted desc" searchform="search_results" />

But thanks!

Offline

#20 2013-05-30 23:03:21

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Search results disappeared

The if statement shouldn’t be different? Instead <txp:if_search> better <txp:if_search_results>?

Which version number of Textpattern are you using?

Offline

#21 2013-05-30 23:18:53

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: Search results disappeared

Since the search used to work, I’ve been beating my head against the wall, thinking about changes I’ve made in the last weeks/months.

I made some changes to the stylesheets and templates about two-three months ago, when I made the website wider. Basic code remained the same. I’m almost positive the search was working then. – I tried the search with earlier versions, – same result.

I’d made a small tweak to txp_article.php, commenting out the code for Category2 selection in the Articles edit (to stop folks from specifying a Category2.) – I went back to the old version, it didn’t help.

I understand what Uli is saying about the s=Search, that it should work without that, but it did work with it since just recently.

I made a version of the home page where I removed all other searches (library catalog search, mobile search) in case that was interfering, but that didn’t help.

My head hurts, I will stop for now! Thx, Vicki

I restored the ‘textpattern’ table about 1.5 months ago.

Offline

#22 2013-05-30 23:30:07

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Search results disappeared

vickilh wrote:

I’d made a small tweak to txp_article.php, commenting out the code for Category2 selection in the Articles edit (to stop folks from specifying a Category2.)

For this you better use the bot_write_tab_customize plugin.

I think it is important to know which Textpattern version you are using. See my post.

Last edited by GugUser (2013-05-30 23:30:27)

Offline

#23 2013-05-31 13:50:23

vickilh
Member
Registered: 2007-10-30
Posts: 96

Re: Search results disappeared

My Textpattern version is 4.4.0. – I can’t upgrade due to the PHP version on the linux box. We’re not upgrading PHP because we’ll be retiring the machine and migrating the website to someplace else.

I made the tweak to txp_article.php via ssh to machine and vi editor. I don’t think this is a problem, – or THE problem.

Offline

#24 2013-05-31 13:55:54

mistersugar
Member
From: North Carolina
Registered: 2004-04-13
Posts: 141
Website

Re: Search results disappeared

Interesting. I’ve noticed much-degraded search results — as in, no results for words I know are used plenty throughout my blog — over the last couple of months. I hadn’t changed my search form since I put it in place many years ago. Got so bad that I added a DuckDuckGo search yesterday. I’ll have to troubleshoot this weekend.

Offline

Board footer

Powered by FluxBB