You are not logged in.
Hi, this is a great plugin.
But now I have some trouble with the sticky-behaviour:
As in txp:article I use two calls of tru_tags_handler, the first with sticky-, the second with live-articles.
Everything is fine when a sticky article exists.
But when there is none it will throw a 404 – (even when commented out!)
I could workaround temporarily by providing stickies for existing tags. But when my clients will add a new tag without creating a sticky article they’ll get problems.
I read about the noarticles-Attribute, but I think another URL will be of no help, it simply should ignore missing sticky-articles, and only throw 404 if there are no articles at all.
Is there any way to get the same behaviour like using twice txp:article?
Offline
saccade – I can’t think of a way to do what you want, in the current version of tru_tags. What you’d need is another attribute that said “don’t redirect if the results are empty”. I’ll add it to my list for the next release.
What’s the original goal of having the second call? Is it just to have sticky results filter to the top? That might be something else I could just add as a specific feature to tru_tags.
Offline
truist, I figured out a workaround to solve the problem for now by modifying your plugin (the same direction you mentioned above):
Simply by replacing this line in the tru_tags_handler-function
txp_die(gTxt('404_not_found'), '404');
by
return $result;
My goal is to include sticky-articles – which aren’t included by default – and sorting them before other ones. (And maybe formatting them differently)
But I think your second idea (specific feature) mentioned above will be too specific. For if it is done within a single output it will be difficult to give sticky-results a special design (for example by wrapping them differently).
I’d much rather like it to work like the article-tag.
But I don’t quite figure out how empty results in one of two calls are treated there. But it seems to be different than the current redirect in tru_tags.
(There is an open question I have to try out: The article-tag’s-result if sticky articles are empty and live-articles are present is: No redirect. But what is if it’s the other way round: There is a sticky article, but no live-article?)
Offline
I’m pleased to announce the release of tru_tags v3.6, which fixes most of the outstanding issues that have been reported on the forum (excluding any major feature requests). Please see the releases page for details, but notable items include:
search_result_excerpt for tag search pages.404_redirect attribute to tru_tags_handler to allow disabling of the 404 redirect feature. This is necessary when calling tru_tags_handler twice, for example when showing sticky articles followed by non-sticky articles.tru_tags_from_article on article list pages by removing an unnecessary database query.Enjoy!
Last edited by truist (2009-11-21 22:46:35)
Offline
@Nathan Typo: Missing http://www.rainskit.com/ for the reference links.
Btw, Posterous as a sideblog is great for pushing such news & compliments :)
Textpattern CMS: Keyword plug-in tru_tags version 3.6 available
Offline
Great! Thanks for the nicely tailored version!
Offline
Hello,
I have a strange problem.
Everytime when I switch the tru_tags plugin on, I get a high cpu load of my fastcgi processes. But I have less than 1 request/second. The most interesting for me is, that all the tags of tru_tag are cached that means in the main section I have something like that:
<txp:zem_cache id="tags_handler" timeout="86400">
<txp:if_section name="tag">
<txp:tru_tags_handler />
</txp:if_section>
</txp:zem_cache>
and the cloud is generated by
<txp:zem_cache ctx="tags" timeout="86400">
<div id="tagwolke">
<h3>Topthemen</h3>
<txp:tru_tags_cloud listlimit="50" mintagcount="5" minpercent="90" maxpercent="200" countwrapchars="()" showcounts="1" texttransform="capitalize" title="Favoriten" activeclass="tagwolke" generatelinks="1" usenofollow="1" section="artikel" />
</div>
</txp:zem_cache>
The article form has this inside:
<txp:zem_cache id="keywords" timeout="86400">
<txp:tru_tags_if_has_tags>
<p class="chlforbidden linie_unten">Damit verbundene Stichworte:<br />
<strong>
<txp:tru_tags_from_article texttransform="capitalize" generatelinks="1"/>
</strong>
</p>
</txp:tru_tags_if_has_tags>
</txp:zem_cache>
The strange thing is that everything works fine, with a maximum cpu load of 10% per php-cgi process , when tru_tags is switched off.
The server has a 2 core Opteron with 1,6 Ghz, Debian Lenny, PHP 5.2.6-1+lenny3, MySQL v5.0.51a-24+lenny2, Lighttpd 1.25 with XCache 1.2.2, Textpattern 4.2.0 and tried tru_tags 3.5 and 3.6. I also tried first different versions of Lighttpd, selfcompiled and standardpakets. For PHP I tried the standard php.ini`s and some own optimized. MySQL v5.0.51a-24+lenny2. The textpattern table has about 31MB and there are about 2100 articles with at least 3 keywords per article.
At first I supposed, that is has something to do, with clean urls, but switching between these options doesn´t change the behaviour.
I use clean-urls over the server.error-handler-404 directive from Lighttpd, see here
Has anyone else this problem? Where to look? Has anyone a hint? Maybe another plugin together with tru_tags causes this high load??
Last edited by whocarez (2010-01-21 16:11:34)
Offline
minpercent="90" maxpercent="200" and stay with the default. I once had reproducable performance issues when using those min&max sizes (with > 1.000 keywords in the cloud / depending on the machine).showcounts="1" to zero or delete it.All in all I would recommend to strip down tru_tags attributes one by one to see if one or two specific attributes cause the load. Go back to default values and work your way up.
In general the issue looks like a database issue. tru_tags is pretty clean & tested well.
Offline
Thanks Markus for your hints.
I tried to reduce the attributes – no success.
Then I removed separately the tags in article form and the cloud – no success
I removed all tru_tag tags – no success.
Only and only switching of the plugin brought me a acceptable load.
Btw. I stressed the site with a curl (no cache) script – individual articles and the mainsite.
When I have tru_tags switched on, then a single page request from a partly cached side needs about 10s and the php-cgi process uses 1 core! If I switch tru_tags off, then ceteris paribus a single page request needs only 1s at max!
Hm, I´m stucked :-(
Offline