Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-21 18:30:16

nemozob
Member
Registered: 2008-04-15
Posts: 36

Older articles not showing up in list?

I’m probably missing something obvious here but for some reason older articles are not being output in a list.

For example…
http://evolve2009.org/people/

You should see a complete list of all the articles assigned to the section ‘people’. Earlier I noticed one was missing from the list. When I do a “Reset time to now…” for that missing article it shows up. So it seems like articles older than one month (or thereabouts) are being excluded but I can’t figure out where that limit is being enforced. The code outputting the list has no such limit, at least not any obvious one.

I’m using 4.0.6

Last edited by nemozob (2008-12-21 18:39:37)

Offline

#2 2008-12-21 18:46:10

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Older articles not showing up in list?

nemozob wrote:

The code outputting the list has no such limit, at least not any obvious one.

So what is that code?

Offline

#3 2008-12-21 19:02:02

nemozob
Member
Registered: 2008-04-15
Posts: 36

Re: Older articles not showing up in list?

I’ve taken out some unneeded HTML here but the Textpattern calls are correct…

This form…
<txp:if_article_list> <h1>All <txp:section title="1" /></h1> <txp:output_form form="listingTable" /> </txp:if_article_list>

calls this form…
<txp:if_section name="people"> <thead><tr><th> <a href="#" onclick="return false;">People</a> </th><th> Events </th></tr></thead> <tbody><txp:article listform="listing-people" /></tbody> </txp:if_section>

which calls this form…
<tr> <td class="col-1"> <h5><txp:permlink><txp:title /></txp:permlink></h5> <txp:excerpt /> </td> <td class="col-2"> <ul><txp:article_custom section="events" form="output-people-events-title" /></ul> </td> </tr>

So at that last form it should be outputting the title of the article. But older articles are just not being output. This sounds similar to this post (which had no real resolution).

http://forum.textpattern.com/viewtopic.php?id=29137

Last edited by nemozob (2008-12-21 19:03:33)

Offline

#4 2008-12-21 19:24:27

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Older articles not showing up in list?

nemozob wrote:

<txp:article listform="listing-people" />

By default txp:article shows only 10 articles, cause the default value for limit is ten. To fix (bypass) that, you could add there a bigger limit value, for example <txp:article listform="listing-people" limit="9999" />.

Last edited by Gocom (2008-12-21 19:25:27)

Offline

#5 2008-12-21 19:55:58

nemozob
Member
Registered: 2008-04-15
Posts: 36

Re: Older articles not showing up in list?

Yes, that fixed that issue. I’m having the same issue though with other articles where resetting the timestamp seems to fix it. In the following code I’m outputting a ‘person’ article. When that loads it runs through all the articles in the ‘events’ section to see if the ID of the ‘person’ article exists in a custom field. If so, it outputs all the ‘event’ articles that have been assigned this person.

<h6>Events</h6> <txp:article_custom section="events" form="output-people-events" />

which calls…

<txp:smd_each include="people" subset="1"> <txp:php> global $articleID; echo '<txp:smd_if field="{var_value}" operator="eq" value="'.$articleID.'">'; </txp:php> <txp:permlink><txp:title /></txp:permlink><br /> <txp:excerpt /> </txp:smd_if> </txp:smd_each>

But, like before, they don’t always display. If I reset the timestamp on the parent ‘event’ article then it shows up.

So, on this page
http://evolve2009.org/people/paul-ehrlich

The link to the associated event title/description for “The Dominant Animal: Threatening Our Own Species” was not showing up, only when I reset the timestamp on the article did it show up.

Last edited by nemozob (2008-12-21 20:08:52)

Offline

#6 2008-12-21 20:05:53

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Older articles not showing up in list?

nemozob wrote:

to see if the ID of the ‘person’ article exists in a custom field.

What is the name of this custom field?

Edit: forget that, it’s probably the same limit problem:

When that loads it runs through all the articles in the ‘events’ section

Doesn’t this mean that it runs through ‘x’ articles (where ‘x’ is the limit you set in the attribute) and not that it runs through the articles until ‘x’ matches are found?

Last edited by els (2008-12-21 20:10:30)

Offline

#7 2008-12-21 20:08:39

nemozob
Member
Registered: 2008-04-15
Posts: 36

Re: Older articles not showing up in list?

The name of this custom field is ‘people’

I also noticed that if I set the ‘Published at day’ for the parent ‘event’ article to 2008/12/19 it won’t list the event title/descripton on the ‘person’ article page. If I set it to 2008/12/20 or 2008/12/21 it outputs fine (today is 2008/12/21).

Last edited by nemozob (2008-12-21 20:10:43)

Offline

#8 2008-12-21 20:11:00

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Older articles not showing up in list?

Have a look at my post above, I edited it.

Offline

#9 2008-12-21 20:18:10

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Older articles not showing up in list?

Anyway, if you upgrade to 4.0.7 you can do the same without the smd plugins :)

Offline

#10 2008-12-21 20:22:18

nemozob
Member
Registered: 2008-04-15
Posts: 36

Re: Older articles not showing up in list?

Doesn’t this mean that it runs through ‘x’ articles (where ‘x’ is the limit you set in the attribute) and not that it runs through the articles until ‘x’ matches are found?

When you say “where ‘x’ is the limit you set in the attribute” which attribute? I thought smd_each would run through all articles in the section ‘events’ and return hits with the variable name ‘people’. I don’t see any limitations being set. And it is working but only if the parent article has a published date within the last 48 hours or so.

And yes, I do intend to upgrade to 4.0.7 but I can’t do it at the moment.

Last edited by nemozob (2008-12-21 20:23:30)

Offline

#11 2008-12-21 20:40:56

nemozob
Member
Registered: 2008-04-15
Posts: 36

Re: Older articles not showing up in list?

Ah, it was a limit problem again. Ugh. I added limit=“9999” to my <txp:article_custom> tags and that has fixed the problem. I think it was only returning and searching through only the 10 most recent results. That’s why changing the timestamp worked, at least temporarily.

Thanks for your help!

Offline

#12 2008-12-21 21:23:48

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Older articles not showing up in list?

nemozob wrote:

I think it was only returning and searching through only the 10 most recent results.

Yes, that’s what I meant. Glad you solved it!

Offline

Board footer

Powered by FluxBB