Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-31 16:08:56

Agogo
Member
From: Sthlm, Sweden
Registered: 2008-11-27
Posts: 31

[Solved] Multiple categories with article_custom - doesn't work!

Hey

Ive upgraded a site to Textpattern 4.0.7 (from 4.0.4) and Im trying to optimize the code in some ways. One downside with the old code is that it uses chh_article_custom – which from one call, in one instance, does over 150 queries.

Since article_custom in 4.0.6, and therefore also 4.0.7, is supposed to accept multiple entries in the tags category and section Ive decided to stop using the built in article_custom instead of the plugin chh_article_custom.

But multiple categories doesnt work!

For testing Ive changed the form to only spit out <txp:title /> – nothing else – and only restricted the article_custom to only search through category (I dont use the section tag at all). The article_custom works fine with only one category assigned to the tag. However, with two or more categories assigned to the tag the result is blank.

My article_custom tag:

<txp:article_custom category="inrikes,utrikes" form="testform" limit="20" />

My form (testform):

<txp:title />

Last edited by Agogo (2009-02-01 16:17:06)

Offline

#2 2009-01-31 17:36:01

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

Re: [Solved] Multiple categories with article_custom - doesn't work!

Can you post the tag trace? (put site in debugging mode, the tag trace is in the source code, after the </html> tag.

Offline

#3 2009-02-01 16:16:28

Agogo
Member
From: Sthlm, Sweden
Registered: 2008-11-27
Posts: 31

Re: [Solved] Multiple categories with article_custom - doesn't work!

Since you asked me to check the tag trace again Els I noticed something wierd about that particular trace and checked the core.

It seems that an old “hack” of a former developer/administrator in publish.php was the bug – and only the category part of the doArticles function (one line). I shouldnt have let him mess with the new version…

No wonder it didnt work. Thanks for making me look twice Els! :)

Offline

Board footer

Powered by FluxBB