Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Article name displayed twice in some URLs
I think I posted regarding this some time ago (a year? Two years? I dropped the issue at the time) but I can’t find the original thread — apologies for the redundancy; I’m hoping to find a solution.
I see a lot of hits for pages like the following in my logs: article/1130/anonymityanonymity, where the article’s name (anonymity in this case) is placed twice in the URL. Textpattern handles this gracefully enough, and loads the appropriate page anyway, but it makes the display of the page unwieldy in the browser, and I’m wondering if it affects search engines. I can’t really see rhyme or reason as to when this happens. Similarly, I frequently see logs such as article/741/command-of-the-language?c=books (category appended to an article address). Are there any ways to redirect to addresses that don’t have the extra junk?
I’ve been seeing this behavior for quite a while and through several versions of txp; I’m now running 4.0.7.
Thanks!
-Alan
Offline
#2 2008-12-06 16:38:14
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article name displayed twice in some URLs
Are you using zem_link? Duplicated titles in URLs is an old plugin problem.
Offline
Re: Article name displayed twice in some URLs
Thanks, Els. But nope, I’m not using zem_link.
edit — that thread points me toward the possibility that other plugins that might affect the url; will investigate some more.
edit the second — I was using a positively ancient version of tru_tags, that included some .htaccess rewriterules. I upgraded (fingers crossed that it’s seamless!) and removed the rewriterules, and am hoping that might help sort it out.
Last edited by schussat (2008-12-06 17:19:54)
-Alan
Offline
Re: Article name displayed twice in some URLs
After deactivating the rewrites from tru_tags, I still see the double-titling in my logs (though I’m not sure how long to expect it would take for them to disappear…). Are there other plugins known to have this kind of affect? Other possibilities?
-Alan
Offline
#5 2008-12-07 18:15:22
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article name displayed twice in some URLs
schussat wrote:
I still see the double-titling in my logs
Can you see where these hits come from? From google or other search engines, or from within the site?
Textpattern handles this gracefully enough, and loads the appropriate page anyway
That’s because of your permanent link mode /section/id/title. If the id exists, it doesn’t matter what follows it in the URL. It would be better if the incorrect URLs returned a 404, so search engines would stop indexing them.
So it’s possible that these URLs have existed in the past, were indexed at the time and because they appear to exist they still show up in search results.
If it looks like the site still contains incorrect links, find the page(s) where they occur and you’ll probably be able to figure out what causes them. Other plugins you could check: gbp_permanent_links, sgb_url_handler (very old!), plugins that affect URLs in general. I assume you checked your .htaccess?
Offline
Re: Article name displayed twice in some URLs
This is getting interesting, Els! Thanks for talking me through some of this. Investigating my logs some more, it looks like the recent articles getting doubletitled are mostly (and probably all) in my links category; sure enough, on the links page, the txp:permlink tag was building the doubled titles — why? Well, I add those links via a bookmarklet that skips the normal txp interface. Perhaps that has something to do with it, although the things that I can observe seem okay: The title itself is fine, the url-only title field per article is okay. So, I wonder what’s behind the txp:permlink tag that might do this? For now, since the links page doesn’t actually need them, I’ve just removed the permalink from the form.
I can’t find anywhere else in the site where the double titles appear, but there are a handful of — primarily older, on the order of two+ years — non-link articles that I see coming in via doubletitled urls in the log. I’m guessing these were due to a different issue some time back, which was resolved, but the urls are still sitting in search indexes somewhere.
I’m intrigued by the idea of changing my permalink mode to something like /section/title, but not really eager to do that since it would mean losing all the current, good search engine placement I’ve got. I don’t suppose there’s a way to redirect from /section/id to /section/title?
Thanks again.
-Alan
Offline
#7 2008-12-07 21:29:43
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article name displayed twice in some URLs
Hmm… my guess would be that it’s the bookmarklet, though I’ve no idea why and how…
For a change of URL scheme, zem’s Redirect Pro automatically redirects from old to new URLs. New subscriptions for the plugin haven’t been available for quite a while (see this thread), but since the plugin was released under GPL fortunately it can still be distributed.
Offline
Re: Article name displayed twice in some URLs
Holy smokes! Redirect Pro is magic. I switched to /section/title and flipped on the plugin, and it’s done.
Thanks again, Els.
-Alan
Offline