Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#286 2007-06-06 03:14:25
Re: tru_tags: A tagging plugin for textpattern
I can’t think of a way in the existing version to work around this, but I think there are a couple of possible solutions with code. I’m wondering how this happens, though – tru_tags shouldn’t ever generate a link that points to an invalid tag. Do you have hand-coded links to existing tags?
The ideal solution would be to redirect “depricated” tags to new, replacement tags. That’s a v4.0 feature, though :)
In the short term, I could support this behavior automatically – if tru_tags_handler is called for a tag that doesn’t exist, it could just do whatever it needs to do to tell TXP that it should render the 404 page. I’m not sure if that’s the right solution for everybody, but I can’t see an immediate problem with it. Anybody see an issue with that?
An alternative would be to provide a function like “tru_tags_if_tag_parameter_has_articles”, and then you could wrap tru_tags_handler with that, or show your error text if it returned false. It’s a bit hacky, but it would be backwards compatible.
Any other ideas? Either way, I’ll put it on the list for the next release (which is probably a month or so away, given my work schedule).
Offline
#287 2007-06-06 09:27:28
Re: tru_tags: A tagging plugin for textpattern
“tru_tags_if_tag_parameter_has_articles” is interesting. I love if/else tags :-)
Esp. for future keyword maintenance features in tru_tags this is an interesting situation. Some time ago we were talking about ‘keyword sets’. In this situation it becomes important to create a relation between keywords and to flag a keyword as outdated and invisible. This keyword would be replaced automatically by the appropriate/valid one from the ‘keyword set’. Even if an author uses the outdated keyword tru_tags would automagically use and publish the valid keyword. Back to the redirect feature: Surfing to tag/outdated will show the result page for tag/valid.
And yes, a standard 404 behavior should be implemented as search engines tend to keep links for a long time.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#288 2007-06-06 14:54:58
- John Wozniak
- Member

- Registered: 2006-10-20
- Posts: 37
Re: tru_tags: A tagging plugin for textpattern
truist wrote:
I’m wondering how this happens, though – tru_tags shouldn’t ever generate a link that points to an invalid tag.
John Wozniak wrote:
This happens when an article gets indexed by a search engine and then the article is deleted.
I had some “dummy content” up that was crawled but I have since deleted it – I see in my logs that these URLS are still occasionally hit. I just don’t want to confuse incoming visitors – ideally.
Last edited by John Wozniak (2007-06-06 18:16:08)
Offline
#289 2007-07-27 18:27:22
Re: tru_tags: A tagging plugin for textpattern
“tru_tags_if_tag_parameter_has_articles” is a very long tag!
usually, we want to show tags that have articles. but there might be some exceptions when you would want to show a tag that doesn’t have articles. do you think that an “if no articles” tag would be better for dealing with the exceptions instead of protecting from errors during general use?
could this be an attribute? 1 = generate a tag only if it has articles. 0 = generate tag regardless.
your idea to go to the error page seems like a safe solution. in the future, maybe 404 could be default, but a different destination could be given as an attribute. noarticles=”/blog/deprecated-tags”
thanks for the great plugin!
Offline
#290 2007-07-27 18:45:50
Re: tru_tags: A tagging plugin for textpattern
To clarify, does this plugin have the ability to show related articles? Eitehr based on the current articles tags or on parameters put in the txp:tag? Is this in consideration for future versions? thnx…
Offline
#291 2007-07-27 19:49:04
Re: tru_tags: A tagging plugin for textpattern
I have a bit of trouble with the <txp:tru_tags_handler /> tag. As I understand it, it should accept the allowoverride attribute. I’ve got this in my page template;
<txp:tru_tags_handler allowoverride="0" form="default" listform="articleList" pgonly="0" />
Both the “default” and “articleList” should display a header-only version of my articles in a list. However, I’ve got a few articles which override the standard form and also do this in the tag search – even though I have allowoverride="0" in the tag.
Am I getting it wrong or is this a bug?
Offline
#292 2007-08-13 12:49:10
Re: tru_tags: A tagging plugin for textpattern
Nobody else having the “allowoverride” problem?
Offline
#293 2007-08-13 16:16:03
Re: tru_tags: A tagging plugin for textpattern
All – just an apology for my long absence, and a warning that it will continue for a few weeks. I’ve been on work travel, vacation, more work travel, and now I have to catch up from it all. I have a small pile of notes and questions that I will eventually follow up on – just not quite yet. Again, sorry for the delay.
Offline
#294 2007-08-28 12:07:02
Re: tru_tags: A tagging plugin for textpattern
Hi,
It is possible to show in the tagcloud only the tags of a category or section?
Thanks.
Offline
#295 2007-08-28 12:26:29
Re: tru_tags: A tagging plugin for textpattern
Yes, you can either exclude a section or limit the tags to (a) section(s). See the tag reference and scroll down to tru_tags_cloud / tru_tags_list
Offline
#296 2007-08-28 16:56:57
Re: tru_tags: A tagging plugin for textpattern
Thanks andreas. I have read the reference and tru_tags_cloud always do not work for a only section. I use the atributte section in tru_tags_cloud but it isn’t results.
Offline
#297 2007-08-28 17:26:24
Re: tru_tags: A tagging plugin for textpattern
I see. So it seems that there are some problems with attributes to that tag. I also had troble with allowoverride not working.
Maybe we’re lucky and Truist will fix these issues once he’s back.
Last edited by andreas (2007-08-28 17:27:47)
Offline
#298 2007-09-02 21:19:30
Re: tru_tags: A tagging plugin for textpattern
Some of my clean urls aren’t working. I just have been playing around with tru_tags on my local installation, so I can’t show you. Simply put though, if I type a dirty url in for the tag that isn’t working, the page loads correctly. Also, the majority of my tags are working correctly with the clean url. Anyone else run into this problem?
EDIT: I just realized the problem: I had identical category and tag names for the ones that weren’t working, just had to delete my stinking categories, now everything’s good, awesome plugin, wish I’d tried it sooner.
Last edited by aswihart (2007-09-02 22:45:51)
Offline
#299 2007-09-03 12:52:49
- minitrue
- New Member
- From: Utrecht
- Registered: 2007-07-11
- Posts: 5
Re: tru_tags: A tagging plugin for textpattern
Hmm, does anyone have an idea if it’s possible to make build the tagcloud only with recent articles? As the database with articles keeps on growing, it seems to me that recent tags with articles are more important than old articles with their tags.
Offline
#300 2007-09-12 12:39:00
Re: tru_tags: A tagging plugin for textpattern
Hi, just put together my first site with textpattern, and I must say I like it a lot. I was just having some minor problems with this plugin:
Was having some trouble with a tag that included an ampersand in it’s name. At the end of the ‘tru_tags_render_cloud’ function, it’s only getting escaped with ‘htmlspecialchars’ in one case (generatelinks) out of three. After fixing this, the activeclass wasn’t getting assigned properly in a tag cloud, since it was comparing escaped with unescaped versions. Adding
$tag_search_tag = function_exists("htmlspecialchars_decode") ? htmlspecialchars_decode($tag_search_tag) : html_entity_decode($tag_search_tag);
directly after setting ‘$tag_search_tag’ fixed this.
Also, in debugging mode it gives some warnings (mildly annoying since it also messes up your feeds) complaining ‘Keywords’ isn’t an index. Also fixed that quickly.
Might be worth fixing these in the plugin? I could of course upload the modified php somewhere if that’s useful.
Offline