Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-06-09 13:26:43
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
problem: articles dont show up
hi,
first off: i’m not the biggest on txp, but i still like the ease of use of it. now here’s a problem i have: on www.wortstaetten.at we have a couple of sections for various things, for authors, press, and events, and events is making the problems. everytime i want to compose an article, it shows up in the admin-pages, it shows up in the list on http://www.wortstaetten.at/?s=termine, but when i click on the link, the article won’t show up.
we had an older txp-version running (3.8, i think…), and it started out with some trouble with the php-code, from one day to the other (i’m not aware of any changes i have made, because i didn’t touch the system, but maybe someone else did, i don’t know…), and i upgraded to the current version of txp. the problem was apparently solved, i could edit articles again, but now the ones parked in “termine” won’t show up, all the other sections are fine.
what could be the reason for this? i’m really grateful for any help provided!
cheers!
Offline
#2 2011-06-09 14:02:12
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: problem: articles dont show up
In your admin > presentation > sections tab look up which page your section “termine” uses. There, search for an article tag in between the div tags for id=“links_breit”. If there is one, look which form it uses for individual articles.
Last edited by uli (2011-06-09 14:03:33)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#3 2011-06-09 14:46:14
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
Re: problem: articles dont show up
this is what it says on the page in the divs mentioned:
<!— links —>
<!— <txp:if_section name=“kontakt”>
<div id=“links”>
</txp:if_section> —>
<txp:if_section name=”,home,termine,autorInnen,info,blog,kontakt,english,presse”>
<div id=“links_breit”>
</txp:if_section>
is this correct?
Offline
#4 2011-06-09 15:05:23
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: problem: articles dont show up
What are the tags immediately after the closing </txp:if_section>? I.e. what tags are in between <div id="links_breit"> and the div that closes the links_breit div?
Last edited by uli (2011-06-09 15:08:04)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#5 2011-06-09 15:08:48
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
Re: problem: articles dont show up
this is the complete links-section
<!— links —>
<!— <txp:if_section name=“kontakt”>
<div id=“links”>
</txp:if_section> —>
<txp:if_section name=”,home,termine,autorInnen,info,blog,kontakt,english,presse”>
<div id=“links_breit”>
</txp:if_section>
<txp:if_section name=”,home”>
<txp:output_form form=“home_links” />
</txp:if_section>
<txp:if_section name=“termine”>
<txp:output_form form=“termine_links” />
</txp:if_section>
<txp:if_section name=“autorInnen”>
<txp:output_form form=“autorInnen_links” />
</txp:if_section>
<txp:if_section name=“info”>
<txp:output_form form=“info_links” />
</txp:if_section>
<txp:if_section name=“kontakt”>
<txp:output_form form=“kontakt_links” />
</txp:if_section>
<txp:if_section name=“blog”>
<txp:output_form form=“blog_links” />
</txp:if_section>
<txp:if_section name=“english”>
<txp:output_form form=“english_links” />
</txp:if_section>
<txp:if_section name=“presse”>
<txp:output_form form=“presse_links” />
</txp:if_section>
</div>
Offline
#6 2011-06-09 15:10:21
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: problem: articles dont show up
What’s inside the termine_links form?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#7 2011-06-09 15:18:41
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
Re: problem: articles dont show up
there is none, only those:
a_termin:
<h3><txp:title /></h3>
<h4><txp:custom_field name=“Termindatum” /></h4>
<txp:stb_if_article_image_category name=“sans-rand”>
<div class=“artikelbild-sans”><txp:article_image /></div>
<txp:else />
<div class=“artikelbild”><txp:article_image /></div>
</txp:stb_if_article_image_category><txp:body />
<txp:if_last_article><txp:else /><hr /></txp:if_last_article>
a_termin_full:
<h3><txp:title /></h3>
<h2><txp:custom_field name=“Termindatum” /></h2>
<br />
<txp:stb_if_article_image_category name=“sans-rand”>
<div class=“artikelbild-full-sans”><txp:article_image /></div>
<txp:else />
<div class=“artikelbild-full”><txp:article_image /></div>
</txp:stb_if_article_image_category>
<txp:body />
<txp:if_last_article><txp:else /><hr /></txp:if_last_article>
a_termin_kurz:
<li><a href=”<txp:permlink />”><txp:title /></a></li>
a_termin_rechts:
<h3><txp:title /></h3>
<h4><txp:custom_field name=“Termindatum” /></h4>
<txp:stb_if_article_image_category name=“sans-rand”>
<div class=“artikelbild-sans”><txp:article_image /></div>
<txp:else />
<div class=“artikelbild”><txp:article_image /></div>
</txp:stb_if_article_image_category>
<txp:body />
<txp:if_last_article><txp:else /><hr /></txp:if_last_article>
Offline
#8 2011-06-09 15:37:42
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: problem: articles dont show up
there is none
I guessed so.
Seems to contradict the original author’s dogma to use article tags in the page but try the following:
Replace
<txp:output_form form="termine_links" />
by
<txp:article form="a_termin" />
or
<txp:article form="a_termin_full" />
Last edited by uli (2011-06-09 15:38:05)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#9 2011-06-09 16:17:54
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
Re: problem: articles dont show up
great, thank you, now the articles show up again on “Termine”, but i can’t make them show up on the homepage. the info-section is fine, for example, but new announcements won’t be put in “Nächste Veranstaltung”.
do you have a clue for me on this one as well?
Offline
#10 2011-06-09 16:37:40
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: problem: articles dont show up
kekskerl wrote:
great, thank you, now the articles show up again on “Termine”,
Cool.
but i can’t make them show up on the homepage.
That one is influenced by the form named “home_links”.
the info-section is fine, for example, but new announcements won’t be put in “Nächste Veranstaltung”.
Can’t find “Nächste Veranstaltung”, which page template does it belong to?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#11 2011-06-09 16:44:58
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
Re: problem: articles dont show up
on the website, when you hit home, it says: “Nächste Veranstaltung” and “Neues aus der Wortstatt”. the second one is fine, being filed with articles from the “info”-section, the first one used to show the termine-section, the last articles, but doesnt at the moment…
Offline
#12 2011-06-09 23:16:58
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: problem: articles dont show up
The frontpage doesn’t give immediate clues. You’ll need to install/use smd_where_used (see link in my signature) and search for instances of Nächste Veranstaltung. Below that we’ll find further hints.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#13 2011-06-10 06:12:41
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
Re: problem: articles dont show up
this is what it says in home_links:
<h1>Nächste Veranstaltung</h1>
<txp:chh_if_data>
<txp:article_custom section="termine" sortby="Posted" sortdir="asc" limit="2" form="a_termin" time="future" allowoverride="1" />
<txp:else />
<txp:article_custom status="hidden" form="a_termin" limit="1" sortdir="asc" />
</txp:chh_if_data>
<br />
<h1>Neues aus der Wortstatt</h1>
<txp:article_custom category="startseite" section="info" sortby="Posted" sortdir="desc" limit="1" form="a_home_links" allowoverride="1" />
now as far as i understand, we use the chh_if_date-plugin to be able to sort the events, so we can show a different time and date for the event than the one used by txp. if the event expires, it shows a default article until there is a new event coming up. but somewhat we have lost this functionality :-/
Offline
Re: problem: articles dont show up
Quite a few things have changed since the version you were using and I think they are the cause of the problem:
- Check your syntax for txp:article_custom. The sortby and sortdir has been replaced by a single attribute
sort="Posted asc". - I don’t think you can use
status="hidden"any more (unfortunately). If you are not using sticky articles elsewhere in that particular context, set that article to sticky instead of “hidden” (which also takes it out of the normal “live”-article flow) and you can then refer to it directly withtxp:article_custom id="123" status="sticky" .... - You’re confusing if_date with if_data (easily done): the plugin
chh_if_datachecks to see if there is any output, executing the else part if there is none. There are also new ways of doing that now too using txp’s in-builttxp:variable/txp:if_variablecombo – see below.
Try this:
<h1>Nächste Veranstaltung</h1>
<txp:variable name="future_events" value='<txp:article_custom section="termine" sort="Posted asc" time="future" limit="1">---</txp:article_custom>' />
<txp:if_variable name="future_events" value="">
<txp:article_custom id="123" status="sticky" form="a_termin" />
<txp:else />
<txp:article_custom section="termine" sort="Posted asc" limit="2" form="a_termin" time="future" allowoverride="1" />
</txp:if_variable>
<br />
<h1>Neues aus der Wortstatt</h1>
<txp:article_custom category="startseite" section="info" sort="Posted asc" limit="1" form="a_home_links" allowoverride="1" />
… replacing 123 with the ID for your “no events”-article.
Note the use of single quotes where the article_custom tag is used inside the variable tag (which effectively says “put the result of the contained tag here”). Note too that with if_variable it has become common practice to test for the empty case first (because one doesn’t always know what will be output), which is why the if … else is constructed around the other way here.
The above tests to see if there is at least 1 article in the future. If for some reason you wanted it to test if there are at least 2 future articles, replace limit="1" with limit="1" offset="1" in the txp:variable tag.
Further up you wrote:
this is the complete links-section…
<txp:if_section name=",home">
<txp:output_form form="home_links" />
</txp:if_section>
<txp:if_section name="termine">
<txp:output_form form="termine_links" />
</txp:if_section>
<txp:if_section name="autorInnen">
<txp:output_form form="autorInnen_links" />
</txp:if_section>
...
BTW: you can replace all those if_section tags with a simpler syntax now. Two options:
1) If you have a form for each of those sections you can do this.
<txp:if_section name=",home,termine,autorInnen,info,kontakt,blog,english,presse">
<div id="links_breit">
<txp:output_form form='<txp:section />_links' />
</div>
</txp:if_section>
(Again, note the use of single quotes where the section tag is used inside the output_form tag)
2) Another option is to use rah_output_section_form, except that you will need to change how you name your forms, e.g. links_<section_name> or alternatively patch the plugin to use suffix instead of prefix.
<txp:rah_output_section_form prefix="links_" default="links_default" />
Last edited by jakob (2011-06-10 06:57:33)
TXP Builders – finely-crafted code, design and txp
Offline
#15 2011-06-10 07:15:43
- kekskerl
- New Member
- Registered: 2011-06-09
- Posts: 8
Re: problem: articles dont show up
wow, thank you very much! now the sticky finally shows up where it should, that’s already very good.
but i’m still having trouble on getting new events on the homepage. could there be a hick-up with forms, as we seem to have a_termine and termine_links.
a_termin:
<h3><txp:title /></h3>
<h4><txp:custom_field name="Termindatum" /></h4>
<txp:stb_if_article_image_category name="sans-rand">
<div class="artikelbild-sans"><txp:article_image /></div>
<txp:else />
<div class="artikelbild"><txp:article_image /></div>
</txp:stb_if_article_image_category><txp:body />
<txp:if_last_article><txp:else /><hr /></txp:if_last_article>
termine_links:
<txp:chh_if_data>
<txp:article limit="3" form="a_termin" time="future" sortdir="asc" />
<txp:else />
<txp:article_custom status="hidden" form="a_termin" limit="1" sortdir="asc" />
</txp:chh_if_data>
Offline