Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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