Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#391 2008-03-10 02:32:04
Re: tru_tags: A tagging plugin for textpattern
Hm. tru_tags generates the 404 page if it doesn’t find any articles that have that tag in the keywords field. It should be using the same search that it uses for generating the tag cloud, and that appears to be working.
If you want to experiment, try setting the noarticles attribute of your tru_tags_handler call to a random URL. If you get that random URL instead of the 404 page, you know that it’s a problem related to tru_tags. If you still get the 404 page, that means that somehow it’s not even getting to the tru_tags code. (I expect you’ll get the URL, but it’s worth trying out.)
And that’s a great find on the metadata – I’m going to start using it!
Offline
#392 2008-03-10 11:52:10
Re: tru_tags: A tagging plugin for textpattern
Actually, I still get the 404 error page. Any ideas?
Offline
#393 2008-03-10 13:09:05
Re: tru_tags: A tagging plugin for textpattern
Wow, that’s surprising. Um… I’m not sure what’s wrong, at this point. Maybe check your server error logs?
Offline
#394 2008-03-10 13:17:10
Re: tru_tags: A tagging plugin for textpattern
WFM: One keyword issue is not reproducible for me too.
Example: DB aktuell
[OT] Use in page header tag <title> via form ‘header_tag_title’
<txp:tru_tags_if_tag_search>
<title><txp:tru_tags_tag_parameter striphyphens="1" /> © Hamburg St. Georg Informationen</title>
<txp:else />
<title>Keyword Search (tag cloud) © Hamburg St. Georg Informationen</title>
</txp:tru_tags_if_tag_search>
Using two forms as described in Trick: Textpattern with page dependent header meta description. The actual whole code for my first form calling the second is in the last comment.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#395 2008-03-10 13:52:26
Re: tru_tags: A tagging plugin for textpattern
I don’t see anything in my error logs, something in particular I should look for?
I tried using a plain .htaccess file to no avail. It’s really weird because if I type in some other tag that REALLY doesn’t have any articles associated with it, the noarticles attribute works.
I also tried making the tag handler display simpler, it was this:
<txp:tru_tags_handler form="excerpt-one" limit="1" noarticles="http://andrewswihart.net" section="blog" />
<txp:tru_tags_handler form="excerpt" limit="99" offset="1" section="blog" />
I changed it (temporarily) to:
<txp:tru_tags_handler form="test" noarticles="http://andrewswihart.net" section="blog" />
…where form ‘test’ is just <txp:excerpt />
Last edited by aswihart (2008-03-10 13:56:14)
Offline
#396 2008-03-10 14:13:30
Re: tru_tags: A tagging plugin for textpattern
OK, I’ve got it working if I eliminate all other page elements except <txp:tru_tags_handler />, so there must be something else messing stuff up. I’ll keep adding things back until I find what breaks it.
EDIT: I figured it out. It was apparently the way I had tag_handler setup (see the first set of tags in my last comment), and even when I had these commented out and replaced with the simpler one, they were causing the tags with only one article to generate a 404 error, presumably because there was no second article for the second tag_hander tag to process.
The reason I have two tag_handler tags, is so the first article in the list can be presented slightly differently, currently I just eliminate the divider image (thin line separating excerpts) from the the first article. Anyone know of another way of doing this (presenting the first article in a list differently)? Also, could this be “fixed” in the plugin? My strategy actually works fine with the <txp:article /> tag, I just tested it by putting one article in a section, and it processes fine using the excerpt-one form and does not choke when there is no second article to process.
BTW, I also realized that the noarticle attribute does actually work on the tags with single articles, if I put it in the second tag_handler tag (the one with the offset) in my comment above. Is there another value I can put in there to make it “do nothing” when it finds no more articles matching that tag? This would fix it, if it would just do nothing instead of throwing a 404 error or redirecting me somewhere else.
Last edited by aswihart (2008-03-10 14:38:37)
Offline
#397 2008-03-11 11:17:30
Re: tru_tags: A tagging plugin for textpattern
I realized, once you posted your original code, what the problem was. You’re right, when the second tru_tags_handler call runs, it doesn’t find any articles, so it redirects the page to the 404 page.
I could fix this by giving you way to turn off the 404 error handling. If your only goal is really to just style the first excerpt differently, though, you could probably use the first-child selector. Either way, I’ll put this on the list for the next version of tru_tags.
Offline
#398 2008-03-11 11:30:03
Re: tru_tags: A tagging plugin for textpattern
I found a better solution, the txp:if_first_article tag, which I never even knew existed. The first/last-child pseudoselectors and child selectors aren’t supported by IE6 anyway, thanks for the suggestion though. Yeah, I guess a quick fix would be to add a value for the noarticle attribute that would turn off error handling, maybe “noerror” or something. Thanks, Nathan, this is a great plugin.
Offline
#399 2008-03-24 13:13:46
Re: tru_tags: A tagging plugin for textpattern
Hi truist,
It’s possible texttransform="capfirst" for the tag tru_tags_tag_parameter in new version of the plugin?
It’s possible show more of a page in the results of tru_tags_handler?
Thanks!.
Offline
#400 2008-03-24 16:20:09
Re: tru_tags: A tagging plugin for textpattern
It’s possible texttransform=“capfirst” for the tag tru_tags_tag_parameter in new version of the plugin?
Isn’t it ‘capitalize’ what you are looking for? The workaround/code I am using:
<span style="text-transform:capitalize;"><txp:tru_tags_tag_parameter striphyphens="1" /></span>
This is a template markup hack. Use a CSS class for the span:
.tru_tags_tag_parameter {
text-transform:capitalize;
font-weight: bold;
}
Which will result in this markup:
<span class="tru_tags_tag_parameter"><txp:tru_tags_tag_parameter striphyphens="1" /></span>
Example: Tag search for ‘video’
Note: It is not possible to use ", ' or " to surround the tag parameter. It breaks the style or CSS declaration (reported before). I did not check nested <span> constructions yet.
Nathan: A ‘wrapsign’ parameter might be needed :)
It’s possible show more of a page in the results of tru_tags_handler?
No. See documentation:
Note: In Textpattern, the limit attribute is defaulted to 10, to limit the output to 10 articles per page, and the txp:older and txp:newer tags are used to paginate the full list. The txp:older and txp:newer tags do not work with tru_tags, but the limit is still used by Textpattern when it outputs the articles. Therefore, tru_tags uses a default limit of 1000 when doing an article search. You can override this limit by setting the limit attribute on tru_tags_handler.
If I remember right the reason for the missing pagination feature is that for txp:older and txp:newer to work the total number of articles in the output must be counted by TXP core after the database query to calculate the pagination (pg2, pg3,…). Nathan?
Source: tru_tags: Usage instructions – Tag reference
Last edited by merz1 (2008-03-24 17:00:06)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#401 2008-03-25 00:54:03
Re: tru_tags: A tagging plugin for textpattern
Thanks again, merz1. I’ll add some sort of feature to handle the capitalization, and the wraptag, for the next version. It may be a while, though, but I’ll keep track of it all.
The issue with the pagination code is that TXP’s pagination code is all intermingled with its result display code, so there’s no way to display paginated results without just copying huge blocks of code, which I’m just not willing to do. But I’m not entirely sure if that’s what Rigel was asking, though. (I’m just not sure.) Rigel?
Offline
#402 2008-03-25 14:55:15
Re: tru_tags: A tagging plugin for textpattern
Nathan: A class="tru_tags_tag_parameter" implementation would also be nice (Didn’t check that but I think class="tru_tags_tag_parameter" is not working).
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#403 2008-03-27 18:34:57
Re: tru_tags: A tagging plugin for textpattern
Nathan: I have found an issue with <txp:page_url /> Textbook: txp:page_url
Code used (shortened)
<a href="http://del.icio.us/post?url=http://sankt-georg.info<txp:page_url />" title="">del.icio.us</a>
Note: The url=http://sankt-georg.info part can not be replaced by <txp:site_url /> because of a trailing slash which leads to a double-slash :( Reported here (and Ruud has the ‘rtrim’ PHP answer).
Output
http://del.icio.us/post?url=http://sankt-georg.info/tag/?t=polizei
I am wondering about the /tag/?t=polizei part. The URL works but looks pretty ugly.
Here is the example page and the bookmark links can be seen in the upper right corner.
Expected URL in d.i.u link (Well, we can’t have it all :)
http://sankt-georg.info/tag/polizei/
This way it works fine with i.e. categories.
Must be another TXP core feature/issue :)
Last edited by merz1 (2008-03-27 18:39:54)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#404 2008-05-14 00:40:28
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: tru_tags: A tagging plugin for textpattern
I have two installations of Textpattern, both using tru_tags. On one site, I see a list of tags in Write tab… whereas on the other site, I don’t see a list of tags in Write tab. Is there something wrong?
<txp:Ruhh />
Offline
#405 2008-05-14 02:28:56
Re: tru_tags: A tagging plugin for textpattern
Probably :)
This may actually be a great opportunity – various people have reported this same problem, but I’ve never been able to reproduce it. Given that you have two sites, one that works and one that doesn’t, maybe there is some difference between the sites that is causing the problem. So, if you don’t mind, please let me know if any of these are true:
Different versions of TXP
Different versions of tru_tags
Different plugins installed
Any unusual tags in the broken site
Different TXP configuration settings
Anything else you can think of that might be different :)
If you’re willing, I think I could probably figure out the problem if I had access to your TXP install. If you’re willing to give me that access, please send credentials to truist-20080513@truist.com and I’ll see if I can figure it out.
Offline