Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[de-de] Suche funktioniert nicht
Ich habe mit:
<form id="search" action="" method="get">
<p><label for="s">Volltextsuche</label>
<input type="text" id="s" name="q" /></p>
</form>
eine Suchmaske in Textpattern eingefuegt. Gibt man jedoch Suchbegriffe ein, werden keine Ergebnisse präsentiert…woran kann das liegen?
Meine Seite: www.ovalnets.de
(bearbeitet, damit der Code und der Link sichtbar wird)
Last edited by Skubidu (2006-08-24 22:13:53)
Offline
Re: [de-de] Suche funktioniert nicht
Wie schaut denn Dein Quelltext für die Suchergebnisseite aus?
Offline
Re: [de-de] Suche funktioniert nicht
Er zeigt zwar an, das “etwas” gefunden wurde, aber weder setzt er Verweiße auf entsprechende Artikel noch zeigt er Excerpte von Ihnen an. Der Quellcode sieht folgendermaßen aus:
<code>
<!— Content ====================================== —>
<div id=“main”>
<h3>Search results</h3>
<ul>
</ul>
<p> Artikel gefunden.</p>
<p> </p>
</div><!— end #main —>
</div><!— end #wrap2 —>
<!— Sidebar ======================================
—>
<div id=“sidebar”>
</code>
In Textpatten wurde der Baustein “search_results” wie folgt eingebunden:
<code>
<li><h4><txp:permlink><txp:title /></txp:permlink></h4>
<p><txp:search_result_excerpt /><br/>
<txp:permlink><txp:permlink /></txp:permlink> ·
<txp:posted /></p></li>
</code>
Last edited by zarathustra (2006-08-26 10:46:01)
Offline
Re: [de-de] Suche funktioniert nicht
Kannst Du mal Deinen Produktionsstatus auf Debug setzen und Deine Tag-Trace der Suchergebnisseite posten (ganz unten im Quelltext zu finden)?
Offline
Re: [de-de] Suche funktioniert nicht
<code>
tag_error <txp:older> -> Notice: Undefined variable: numPages on line 664
tag_error <txp:newer> -> Notice: Undefined variable: numPages on line 622
tag_error <txp:bas_shout/> -> Notice: Undefined variable: wrapclass on line 153
</code>
Ich vermute mal die beiden ersten Fehlermeldungen könnten etwas mit dem Problem der Suchfunktion zu tun haben. Leider bin ich kein gelernter Programmierer und an sich schon sehr froh, das mit Textpattern alles so gut läuft :-)
Offline
Re: [de-de] Suche funktioniert nicht
Achso, du meintest ja den Quelltext der Suchseite im “DEBUG”-Modus:
bc..
<!— Runtime: 0,1574 —>
<!— Query time: 0,001124 —>
<!— Queries: 29 —>
<!— Memory: 2503Kb, end of textpattern() —>
<!— txp tag trace:
[SQL (0,000550): select name from `txp_lang` where lang=‘de-de’ limit 1]
[SQL (0,001612): select name, data from `txp_lang` where lang=‘de-de’ AND ( event=‘public’ OR event=‘common’)]
[SQL (0,009329): select name, code from `txp_plugin` where status=‘1’]
[SQL (0,000512): select * from `txp_section` where name = ‘default’ limit 1]
[SQL (0,000913): insert into `txp_log` set `time`=now(),page=’/?q=Windows’,ip=‘84.184.53.68’,host=‘84.184.53.68’,refer=’‘,status=‘200’,method=‘GET’]
[SQL (0,000866): select user_html from `txp_page` where name=‘default’]
[Seite: default]
<txp:output_form form=“head” />
[SQL (0,000495): select form from `txp_form` where `name` = ‘head’ limit 1]
<txp:page_title/>
<txp:css/>
<txp:output_form form=“header” />
[SQL (0,000446): select form from `txp_form` where `name` = ‘header’ limit 1]
<txp:sitename/>
<txp:ako_nav name=“Heimseite,Archiv,Exhibition,Postkarten,Frage stellen,Impressum” url=”/,/?s=archive,/?s=exhibition,/?s=about,/?s=fragen,/?s=impressum” headlvl=“1” headon=“0” divon=“0” classtag=“1” />
<txp:if_search>
[<txp:if_search>: true]
<txp:search_result_count/>
</txp:if_search>
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:older>
</txp:older>
<txp:newer>
</txp:newer>
</txp:if_article_list>
<txp:output_form form=“sidebar” />
[SQL (0,000794): select form from `txp_form` where `name` = ‘sidebar’ limit 1]
<txp:category_list wraptag=“ul” break=“li” class=”“ />
[SQL (0,000448): select name,title from `txp_category` where name != ‘default’ and type=‘article’ order by name]
<txp:recent_articles limit=“3” break=“li” wraptag=“ul” sortby=“Posted” sortdir=“desc” class=”“ />
[SQL (0,006025): select *, id as thisid, unix_timestamp(Posted) as posted from `textpattern` where Status = 4 and Posted <= now() order by Posted desc limit 0,3]
<txp:recent_comments limit=“5” break=“li” wraptag=“ul” class=”“ />
[SQL (0,000729): select * from `txp_discuss` where visible=1 order by posted desc limit 0,5]
[SQL (0,000440): select Title, Status from `textpattern` where ID=9]
[SQL (0,000731): select *,ID as thisid, unix_timestamp(Posted) as posted from `textpattern` where ID=9]
[SQL (0,000399): select Title, Status from `textpattern` where ID=6]
[SQL (0,004784): select *,ID as thisid, unix_timestamp(Posted) as posted from `textpattern` where ID=6]
[SQL (0,000531): select Title, Status from `textpattern` where ID=6]
[SQL (0,004108): select *,ID as thisid, unix_timestamp(Posted) as posted from `textpattern` where ID=6]
[SQL (0,000647): select Title, Status from `textpattern` where ID=6]
[SQL (0,004046): select *,ID as thisid, unix_timestamp(Posted) as posted from `textpattern` where ID=6]
[SQL (0,000504): select Title, Status from `textpattern` where ID=6]
[SQL (0,004177): select *,ID as thisid, unix_timestamp(Posted) as posted from `textpattern` where ID=6]
<txp:lhg_article_rotate rotate=“hour” form=“excerpt”/>
[SQL (0,000739): select *, unix_timestamp(Posted) as uPosted from `textpattern` where ID=‘66’ and Status=‘4’]
[Artikel 66]
<txp:bas_shout/>
[SQL (0,000544): select * from `txp_bas_shout` where id != “” ORDER BY id DESC LIMIT 1000]
[SQL (0,000407): select Form from `txp_form` where `name` = ‘excerpt’ limit 1]
[Baustein: excerpt]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_excerpt>
[<txp:if_excerpt>: false]
<txp:body/>
<txp:comments_invite/>
<txp:posted/>
<txp:category1 link=“y” />
<txp:category2 link=“y” />
</txp:if_excerpt>
<txp:feed_link label=“RSS Feed” section=“article” flavor=“rss” wraptag=“li” />
<txp:feed_link label=“Atom Feed” section=“article” flavor=“atom” wraptag=“li” />
<txp:link_feed_link label=“Links RSS Feed” wraptag=“li” />
<txp:mem_online_users timeout=“10800” />
[SQL (0,020184): select COUNT as OnlineUsers from `txp_log` where (UNIX_TIMESTAMP(time) >= 1156592325)]
<txp:tru_tags_cloud/>
[SQL (0,000461): select name from `txp_section` where searchable != ‘1’]
[SQL (0,002739): select Keywords from `textpattern` where Keywords <> ‘‘and Section != ‘contact’ and Section != ‘fragen’ and Status >= ‘4’ and Posted < now()]
[ —- secondpass —- ]
—>
[editiert zur besseren Lesbarkeit]
Last edited by Skubidu (2006-08-26 15:14:49)
Offline
Re: [de-de] Suche funktioniert nicht
Kann es sein, dass Du innerhalb Deines <txp:if_search> kein <txp:article /> eingebaut hast?
Versuchs mal mit <txp:article form="search_results" />.
Bin mir gerade nicht sicher, ob dass das Problem ist, aber nen Versuch ist es ja wert.
Offline
Re: [de-de] Suche funktioniert nicht
Genau das war der Fehler, habe den Code <code><txp:article form=“search_results” /></code> in der Seitenvorlage “default” wie folgt eingebunden:
<code>
<txp:if_search>
<h3>Search results</h3>
<ul>
<txp:article form=“search_results” />
</ul>
<p><txp:search_result_count />.</p>
<txp:else />
<txp:if_section name=“tag”>
<txp:tru_tags_handler />
<txp:else />
<txp:article listform=“excerpt” />
</txp:if_section>
</txp:if_search>
</code>
Danach funktioniert die Suche einwandfrei! Besten Dank für die Hilfe!
Offline
Re: [de-de] Suche funktioniert nicht
Keine Ursache. Schön, dass es jetzt funktioniert…
Offline
Pages: 1