Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[wiki] interwiki Language Links
I’m noticing that none of the interwiki (or mirror) language links are working. For example, try the ones on Getting Started… page. The message I see is…
Bad title
The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title. It may contain one or more characters which cannot be used in titles.
Knowing that Hak recently did some URL changes somewhere-somehow, and knowing that the language declarations in the “interwiki” table have specific URLs (old school) set to each language type, I suspect the interwiki language URLs need updated, maybe?
Hak, I could possibly help update the table entries if you could once again remind me (via email) the phpMyAdmin URL (better note the login details too).
Side issue, anyone:
I’m trying to set up something similar on another project. I get the outgoing alternate language links working, but not the return english links. Are you supposed to add the English declaration in the interwiki table too? Actually, I’ve tried it both ways and neither seems to be working. Any ideas are most appeciated. Multiple databases (one for each language) is not really a desired approach.
Offline
Re: [wiki] interwiki Language Links
This is new. I haven’t rolled out the url changes because they require re-titling some pages and I haven’t had the time to go through and do a thorough index of how many are affected.
I wonder if it’s a new feature in the latest build. ugh.
The language links in the home page work so it must be some inconsistency in how the two lin types get created that is causing an issue.
Last edited by hakjoon (2007-04-25 17:10:32)
Shoving is the answer – pusher robot
Offline
Re: [wiki] interwiki Language Links
AHA!! It looks like the url remapping I put in place to always send us textbook.textpattern.net is somehow messing up the titles. The side links still point to textpattern.net
Sorry Destry I thought you were referring to the clean url changes which I’m still testing. This should be an easy fix.
Shoving is the answer – pusher robot
Offline
Re: [wiki] interwiki Language Links
Ok Should be all fixed now. They seem to be working for me.
Shoving is the answer – pusher robot
Offline
Re: [wiki] interwiki Language Links
Cool.
Regarding my side issue. I have a MW project where language links are being setup the same way as TxB, but it’s not working the same. I’ve added the languages to the interwiki table, and the English-to-lang link direction works, but not the other way.
Q1: With regard to TxB, did we add an interwiki record for English too, or was that not necessary?
Brainstorming (another side):
I’ve been considering the URL for the languages in the interwiki table. Using French as an example, the trailing syntax is like…
...title=fr/$1
Stepping back a second, the author workflow is typically this:
- they go to an English page
- add the language syntax at bottom in the code, fr:Titre en français (straight brackets not shown)
- click the resulting “français” link in the Languages list
- arrive in edit mode for a new page titled fr/Page en français
- add content and a mirror link back to the English version page, en:Title in English (straight brackets not shown)
This suggests the $1 in the interwiki table is simply the page title, and the “fr/” is dynamically added as defined by the URL.
So what if you changed the URL definition to something like …title=$1/fr (Page en français/fr), which makes the generated URL a bit easier to read. Or even better simply …title=$1 for the title alone.
If we remember there are three fields for each language record in the interwiki table, one of the specifically defining the language (different from the URL field), which is tied to the “fr:” part of the link in the code of the page, then theoretically you could drop the language indicator from all URLs without messing up the mirroring relationship. In other words, as long as the language has been defined in the database (including the desired title output), and the language link is added to a given page, it should communicate just the same to a corresponding link, no?
The benefits, if not clear by this point, are titles in any language without any funky language codes attached. Am I making sense, or totally overlooking the obvious?
Last edited by Destry (2007-04-26 11:32:20)
Offline
Re: [wiki] interwiki Language Links
Destry wrote:
Q1: With regard to TxB, did we add an interwiki record for English too, or was that not necessary?
Yes, it just goes to …?title=$1
So what if you changed the URL definition to something like …title=$1/fr (Page en français/fr), which makes the generated URL a bit easier to read. Or even better simply …title=$1 for the title alone.
If we remember there are three fields for each language record in the interwiki table, one of the specifically defining the language (different from the URL field), which is tied to the “fr:” part of the link in the code of the page, then theoretically you could drop the language indicator from all URLs without messing up the mirroring relationship. In other words, as long as the language has been defined in the database (including the desired title output), and the language link is added to a given page, it should communicate just the same to a corresponding link, no?
I think this should work as you described. You just have to make sure you always create the links the same way using the :lang:title format There are some cases in Textbook where the pages were created using lang/title so I don’t think it can be switched around without having to move all the pages (I should investigate).
I’m also curious if we need the full url or if we could get away with /wiki/index.php?lang/$1 Which would have eliminated the problem we were seeing with the .htaccess maintaining the textbook subdomain. It would also make installations more portable.
Last edited by hakjoon (2007-04-26 13:55:34)
Shoving is the answer – pusher robot
Offline
Re: [wiki] interwiki Language Links
Yep, works as conceived. Just got it all working on this other gig; bi-directional language links with no language codes in the way. Too bad we didnt’ think of this in the beginning.
Under that design, maybe it makes sense to have custom namespaces for languages…your titles are clean, but you have a namespace there in the URL to show that there’s a different area of activity, as opposed to just a foreign language title in the main namespace.
So if I’m thinking of that right, you first configure the custom namespaces, then adjust the interwiki table URLs to account for the new namespace on each language. I could be wrong though, and I wouldn’t know anything about the non-Latin languages.
Another side:
We should think about taking advantage of wiki Categories more too. Really easy and quite useful. For example, say you want an index page of tips and tricks, so you decide on a category name “Tips and Tricks”. At that point, any existing or new page that you want in that category you add the following at the bottom of the page (above the language links if they exist):
[[Category:Tips and Tricks]]
When saved, you’ll see a box at the bottom of the page that gives two links, one to the complete list of categories (however have been created to date) and one to the category page just created (in this case Tips and Tricks). The category page itself auto-alphabetizes the titles of all added pages; just added the cat tag above to any page and the wiki does the rest of the organization. You can then stick a link to the Category index from anywhere. One thing though, the alphabetizing is by first letter of the page title, so it takes good page titling habits for the index to be relatively intuitive.
Offline
Pages: 1