Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-18 19:50:32

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Small problem subsequent to 4.0.4 update - any ideas?

Update to 4.0.4 seemed to go perfectly smoothly – diagnostics all passed, website seemingly intact and working fine.

However four “Sticky” articles that I have that display constantly changing data are now showing blank space – These are the “Current Summaries” on the Weather Reports page .

This is only the second web-site that I’ve ever done, and the first using any CMS so go easy on my methodology…

The contents in these articles are updated every 15 minutes – the only way I could figure out to include this data in an article was to use some php trickery (only one small snag, my php knowledge makes a postage stamp look like a football field…)

So here is what I came up with – the articles simply have four variations of this;

<txp:output_form form="current_month" />

The forms are all similar to this;

<pre><txp:php> $str = file_get_contents(txpath.'/weather/NOAAMO.TXT'); echo htmlentities($str); </txp:php></pre>

I have an ftp program uploading “NOAAMO.TXT” (and three other variations) to /textpattern/weather/ . I would have preferred to have the “weather” directory elsewhere – but I couldn’t figure out the php syntax to get that to work….

It was working fine in 4.0.3, but not in 4.0.4 – I suspect I need to change the php within the form that is being called.

I’d be very grateful for any help or ideas.

Offline

#2 2006-10-18 22:41:14

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Re: Small problem subsequent to 4.0.4 update - any ideas?

OK, simple solution – turns out my PHP isn’t the problem, rather that the four articles in question had a status of “Sticky”.

This was my way of preventing them appear in the flow of the listings on this page .

By changing their status to “Live”, the articles appear correctly, but also appear in the article list under “Monthly Summaries 2006” , which I wanted to avoid, and in 4.0.3 was succeeding in doing so.

So what has changed in 4.0.4 that means that an article with a status of “Sticky” won’t display?

For the record the page template in question is using <txp:if_individual_article><txp:article form="section_head"/></txp:if_individual_article>

And the form “section_head” is simply <h1><txp:title /></h1><txp:body />

Offline

#3 2006-10-19 06:29:07

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Re: Small problem subsequent to 4.0.4 update - any ideas?

Well, I’ve managed to remove the offending articles from the respective lists that I didn’t want them to appear in by a combination of publication date change and category removal. So having the article’s status as “live” is no longer a problem.

I’m still puzzled however, what has caused the non-display of individual “Sticky” articles.

Something in 4.0.4?
Something in my particular update to 4.0.4?
My incompetence?

Offline

#4 2006-10-19 07:16:29

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Small problem subsequent to 4.0.4 update - any ideas?

if you want an article-tag to display sticky articles, you’ll have to use status="sticky". Does that answer your question? (Otherwise I do no not understand what you are doing and what you are expecting to happen).

Offline

#5 2006-10-19 11:02:16

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Re: Small problem subsequent to 4.0.4 update - any ideas?

Sencer, here is one of the four pages that I’ve had the problem with .

The content of the article is updated every 15 mins (with an additional 15 min delay) from our weatherstation. The content is simply an uploaded text file. You’ll see links to this article in the right-hand navigation column “Current Month Report”.

That link is simply <txp:article_custom form="headline" id="18" /> .

The tags in the page template displaying the content (main body) are ;

<txp:if_individual_article><txp:article form="section_head"/></txp:if_individual_article>

The form “section head” is simply;

<h1><txp:title /></h1>
<txp:body />

The article was set to a status of Sticky to prevent it appearing in the lists of the weather summaries that I created here .

In 4.0.3, no problem, the page displayed correctly. In 4.0.4 I found the content (main body) of the page empty. I presumed in my first post that this was due to my use of php to pull the text file into the article and that something had changed in the new version of Textpattern that was now preventing this.

Instead I found that by changing the status of the article to “Live” it was displayed correctly, as in 4.0.3 .

I’ve left the articles with the live status for now and have changed publication dates and categories in these articles to prevent them appearing in article lists where I don’t want them.

I have experimented with other articles – changing their status to “sticky”, as expected, removes them from article lists. If however I type in the url that I know the page has, I again get a blank content area where the article ought to be.

I hope that makes sense.

Offline

#6 2006-10-19 21:32:18

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Small problem subsequent to 4.0.4 update - any ideas?

The “Sticky” article semantics changed slightly in 4.0.4. Previously there were some ambiguous cases where article and article_custom tags would display Sticky articles by default. It’s now stricter: with one exception1, those tags will only ever display a Sticky article if an explicit status="sticky" attribute is used. Usually we don’t change default behaviour like this between versions, but this particular case caused problems.

1 The exception is, <txp:article_custom id="123" /> will display either a Sticky or Live article.


Alex

Offline

#7 2006-10-20 00:31:42

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Re: Small problem subsequent to 4.0.4 update - any ideas?

Thanks Alex – good to know it wasn’t a faulty upgrade on my part, just poor use of the “sticky” feature to control article list content.

Offline

Board footer

Powered by FluxBB