Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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,477

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,477

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,477

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: 174
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.


—-

Anton aka mistersugar – ‘yumi stap storian’ – antonzuiker.com

Offline

#25 2013-05-31 13:57:41

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

Re: Search results disappeared

And vickilh, how did I not know that my own public library is using Textpattern!


—-

Anton aka mistersugar – ‘yumi stap storian’ – antonzuiker.com

Offline

#26 2013-05-31 14:43:36

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

Re: Search results disappeared

vickilh, have you found this troubleshooting article in the wiki?


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

Offline

#27 2013-05-31 14:54:17

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

Re: Search results disappeared

:-) Did you replace your TXP search with the duckduckgo? Why did you go with that instead of google search? — Does it make sense to you that TXP search results could change like that?

Thx! Vicki

Offline

#28 2013-05-31 15:05:11

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

Re: Search results disappeared

Hi Uli,

I did see that article yesterday, but I looked at it more closely today. A couple of things I haven’t mentioned: I have a search template, “chpl-search”, with a section called “Search” (capital “S”).

And something that is surely unrelated but I’ll mention. All these years when I went to the Pages tab, a (very very old) template called “default” would come up by default, no matter what other pages I added. – But recently that changed so that the template “chpl_default” (which is the one we’ve used for almost the life of the website) comes up by default instead.

thanks! Vicki

Offline

#29 2013-05-31 19:42:31

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

Re: Search results disappeared

Please don’t give up on me yet guys!

Based on this page, I’m thinking that the action= specification needs to point to my Search section (? how was this working before??) I tried that with a test page, but still doesn’t work.

Here is the search form:

<form role="search" class="site-search" action="/txp/?s=Search" method="get"> 
        <div style="float:left;">
        <input type="text" name="q" id="q" size="23" onfocus="this.value='';"  class="searchbox_textbox" value="Search website ..."  onChange="submit()" />
        </div>
        <div class="searchbox_button">
                <input type="image" name="Header1:SearchBox1:searchButton" id="Header1_SearchBox1_searchButton" src="images/go_Button.gif" alt="Submit search" border="0" />
        </div>
</form>

I also tried adding the if_search code to my “default” section page, but no go.

Another STRANGE thing I noticed today. My error_results has, again, been working fine for years. And then I noticed today that the PHP in the top half (yes, only the top half) was no longer being recognized. When I switched it to using <txp:php>, everything was ok. The bottom half of the page works fine with regular PHP.

I’m wondering if I changed the “default” Section page at some point recently. The default page is never used and is super old. The “default” Section now uses the up-to-date chpl_default page. Could this affect things like my Search and the error_results?

Help!! Should I just switch out my search to Google search? Help! Thx, Vicki

{Edited to make Textile work. – Uli}

Last edited by uli (2013-05-31 20:50:24)

Offline

#30 2013-05-31 19:49:27

etc
Developer
Registered: 2010-11-11
Posts: 5,690
Website GitHub

Re: Search results disappeared

Please put the site in debug mode, make a search and report back any error messages.

Offline

Board footer

Powered by FluxBB