Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-02-14 09:40:37

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: My sticky article disappeared after TXP upgrade?

I can’t find anything helpful in the tag trace. I’ve included two excerpts from it here.

1) Article that works

bg. <txp:article form=“default” listform=“newslist” limit=“15” offset=“3” allowoverride=“1” /> [SQL (0,011349): select *, unix_timestamp(Posted) as uPosted from db_textpattern as textpattern where ID = 247 and Status = 4 limit 1] [artikel 247] [SQL (0,007802): select Form from db_txp_form as txp_form where name=‘default’] [Form: default] <txp:title/> <txp:posted/> <txp:author/> [SQL (0,006829): select RealName from db_txp_users where `name` = ‘user’ limit 1] <txp:body/> <txp:comments_invite wraptag=“p” />
<txp:if_individual_article> [<txp:if_individual_article>: true] <txp:link_to_prev> [SQL (0,022204): select *,ID as thisid, unix_timestamp(Posted) as posted from db_textpattern as textpattern where ID=245] <txp:prev_title/> </txp:link_to_prev> <txp:link_to_next> </txp:link_to_next>
</txp:if_individual_article>
<txp:if_article_list> [<txp:if_article_list>: false]
</txp:if_article_list>

As you can see, it displays the article’s body etc. as I want it to.

2) Sticky article that isn’t displayed correctly

bg. <txp:article form=“default” listform=“newslist” limit=“15” offset=“3” allowoverride=“1” /> [SQL (0,005601): select *, unix_timestamp(Posted) as uPosted from db_textpattern as textpattern where ID = 247 and Status = 4 limit 1]
<txp:if_individual_article> [<txp:if_individual_article>: true] <txp:link_to_prev> </txp:link_to_prev> <txp:link_to_next> </txp:link_to_next>
</txp:if_individual_article>
<txp:if_article_list> [<txp:if_article_list>: false]
</txp:if_article_list>

It fails to display article body etc., though the it is recognised as an individual article and not a list.

These two examples are made out of the same article, first with status published and since with status sticky. They use the same forms, templates, section, categories etc. There are no conditional tags in the subpage, besides if_article_list and if_individual_article.

I’m sorry to keep bothering you with this, but it’s becoming a huge problem for me, and I still have no clue what’s wrong. I hope someone can assist me.

Offline

#14 2007-02-14 13:11:14

dingoboy
Member
Registered: 2006-09-07
Posts: 48

Re: My sticky article disappeared after TXP upgrade?

Problem solved!

I did not find any errors (still), but I thought of a workaround.

<txp:if_individual_article>
    <txp:article status="sticky" form="default" />
</txp:if_individual_article>

Not perfect and not totally without problems of its own, but it works.

I claim that this is due to a bug – or an undocumented feature – in the way <txp:article> handles articles with status ‘sticky’ in Textpattern 4.0.4.

Thanks for your assistance, everybody! :-)

Offline

#15 2007-02-14 13:38:43

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: My sticky article disappeared after TXP upgrade?

If you like, go back to your original subpage and try this:

<txp:if_article_list>
	<txp:article form="default" listform="newslist" limit="15" 
offset="3" allowoverride="1" />
<txp:else />
	<txp:article status="sticky" form="default" /> <!-- this tag should display the sticky article -->
	<txp:article form="default" />
</txp:if_individual_article>

Also, I’m pretty sure that just this (without any conditionals should work)

<txp:article status="sticky" form="default" /> <!-- this tag should display the sticky article -->
<txp:article form="default" />

(Of course, the second txp:article doesn’t have all the attribute you need.)

Finally, if that works, this also should work.

<txp:article status="sticky" form="default" /> <!-- this tag should display the sticky article -->
<txp:article form="default" listform="newslist" limit="15" 
offset="3" allowoverride="1" />

If that last one doesn’t work, there may be a bug as you said, with one of the attributes in form="default" listform="newslist" limit="15" offset="3" allowoverride="1"


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB