You are not logged in.
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
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
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
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
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
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
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