Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-27 21:03:51

Locutionist
Member
From: The mountains, central PA, USA
Registered: 2005-08-15
Posts: 57
Website

tag_error <txp:recent_articles> Undefined variable: out

Any way to get around this? I want it to display a list of recent articles from a specific category, but if there are no articles in that category, I’d like the list to just be blank. I definitely DON’T want a big old ugly error message across the top of the page. I’ve tried messing with a few conditional tags but they don’t seem to fix it.

You can see the error here: http://caemployees.com/

My tag looks like this:

[code]txp:recent_articles break=“li” wraptag=“ul” category=“Job-Opportunities” limit=“10” /[/code]

Thanks much.

Offline

#2 2005-12-27 22:37:23

Locutionist
Member
From: The mountains, central PA, USA
Registered: 2005-08-15
Posts: 57
Website

Re: tag_error <txp:recent_articles> Undefined variable: out

[RESOLVED] Okay, well, my client has decided that there will always be something posted under that category, and not to worry about the error.

My apologies folks, it is not my intent to clutter the board with unnecessary posts. Seems like every time I have a question lately, the problem magically resolves itself somehow.

Just for clarification, the error has NOT been fixed. It is still appears to be the case that if a recent articles list has nothing to display, it generates an undefined variable error. On this particular site, however, the recent articles list will always have something to display, and therefore the error won’t show.

Thanks again,
-Paula

Last edited by Locutionist (2005-12-27 22:39:33)

Offline

#3 2005-12-28 06:43:54

takshaka
Archived Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: tag_error <txp:recent_articles> Undefined variable: out

Any way to get around this?

You should set your production status to “Live” on the admin page so that errors like this won’t be broadcast to the world.

But you’re right. There are a lot of tags that may generate this warning because they do is_array() on an undefined variable.

Offline

#4 2005-12-28 13:34:13

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

Re: tag_error <txp:recent_articles> Undefined variable: out

Thanks for reporting, this is fixed in svn now, and will appear in the upcoming 4.0.3 release.

Offline

Board footer

Powered by FluxBB