It's strange (but I guess that there's a sound reason) that plain wikilinks point to a variable field of wiki records (the name of the page) while many troubles would be solved, if they could point to the invariable field of such records: the id. The obviuos restult is, that all links are broken (and need fixing) as soon as a page is "moved" (t.i. renamed).
My question is: which is the sound reason for this strange thing? There's some idea about fixing this?
Alex
2010/10/4 Alex Brollo alex.brollo@gmail.com:
It's strange (but I guess that there's a sound reason) that plain wikilinks point to a variable field of wiki records (the name of the page) while many troubles would be solved, if they could point to the invariable field of such records: the id. The obviuos restult is, that all links are broken (and need fixing) as soon as a page is "moved" (t.i. renamed).
Don't redirects exist specifically for that?
My question is: which is the sound reason for this strange thing? There's some idea about fixing this?
Err.. perhaps they decided people should be able to comprehend the link destianation? Plus I remember something about "nice URLs" being a MUST DO in SEO a while ago...but I'm not 100% sure on that. I certainly hope this won't change anytime soon, on Wikipedia at least.
On Mon, Oct 4, 2010 at 10:54 AM, Strainu strainu10@gmail.com wrote:
2010/10/4 Alex Brollo alex.brollo@gmail.com:
It's strange (but I guess that there's a sound reason) that plain wikilinks point to a variable field of wiki records (the name of the page) while many troubles would be solved, if they could point to the invariable field of such records: the id. The obviuos restult is, that all links are broken (and need fixing) as soon as a page is "moved" (t.i. renamed).
Don't redirects exist specifically for that?
Better, use permalinks, which point to a specific revision id.
My question is: which is the sound reason for this strange thing? There's some idea about fixing this?
Err.. perhaps they decided people should be able to comprehend the link destianation? Plus I remember something about "nice URLs" being a MUST DO in SEO a while ago...but I'm not 100% sure on that. I certainly hope this won't change anytime soon, on Wikipedia at least.
It 'd be nice to have the page_id as optional parameter... but I think you can get the page's title via the API.
Marco
2010/10/4 Strainu strainu10@gmail.com
2010/10/4 Alex Brollo alex.brollo@gmail.com:
It's strange (but I guess that there's a sound reason) that plain
wikilinks
point to a variable field of wiki records (the name of the page) while
many
troubles would be solved, if they could point to the invariable field of such records: the id. The obviuos restult is, that all links are broken
(and
need fixing) as soon as a page is "moved" (t.i. renamed).
Don't redirects exist specifically for that?
:-) Yes, they just exist for that... but in my view of "layman database manager" I learn by experience a rule of relational databases: NEVER link to variable fields of a table! Always link to id! So, IMHO redirects are merely a patch to an unfixed issue.
Please imagine something like this: it could (perhaps! I'm NOT a programmer!) fix the whole thing. User writes wikilink as usual. As soon as the page is posted, the server converts param 1 into an id. Than, when the page is loaded, the param 1 is converted again into the UPDATED, RUNNING name of the page, so that user can't view anything... but a right, updated name of the linked page, even if it has been "moved".
Am I completely mad?
Alex
On Mon, Oct 4, 2010 at 8:27 PM, Alex Brollo alex.brollo@gmail.com wrote:
:-) Yes, they just exist for that... but in my view of "layman database manager" I learn by experience a rule of relational databases: NEVER link to variable fields of a table! Always link to id! So, IMHO redirects are merely a patch to an unfixed issue.
Please imagine something like this: it could (perhaps! I'm NOT a programmer!) fix the whole thing. User writes wikilink as usual. As soon as the page is posted, the server converts param 1 into an id. Than, when the page is loaded, the param 1 is converted again into the UPDATED, RUNNING name of the page, so that user can't view anything... but a right, updated name of the linked page, even if it has been "moved".
Am I completely mad?
Wikilinks are NOT references to pages, but instead to concepts. We don't have a "concepts" table (if you want to use DB-speak, because concepts don't have any non-key attributes), but a concept's primary key is its page title.
This is why we let people create links to non-existent pages — because while a page may not yet be associated with the concept, we want to link to it as soon as one is created.
It's also erroneous to say that page IDs do not change. They change when a page is deleted or undeleted, and in a few other circumstances.
Hope this helps clarify,
Andrew
On Mon, Oct 4, 2010 at 4:42 AM, Alex Brollo alex.brollo@gmail.com wrote:
It's strange (but I guess that there's a sound reason) that plain wikilinks point to a variable field of wiki records (the name of the page) while many troubles would be solved, if they could point to the invariable field of such records: the id. The obviuos restult is, that all links are broken (and need fixing) as soon as a page is "moved" (t.i. renamed).
My question is: which is the sound reason for this strange thing? There's some idea about fixing this?
1) Links to nonexistent pages (which don't yet have an id) are permitted.
2) Sometimes you have the names of specific topics redirecting to general topics. E.g., on a small wiki, [[Grizzly bear]] might redirect to [[Bear]]. When I type [[Grizzly bear]], I mean to link to the article about grizzly bears. Although that's currently part of the article about bears, that might stop being the case. If someone changes [[Grizzly bear]] from a redirect into its own article, I want all links to now point to the new article, not the thing it used to redirect to.
3) When you follow a redirect, we need to display the "redirected from" message, so that editors can notice and easily reach and change the redirect if necessary. That means that we need to use a different URL for accessing articles through redirects vs. accessing it directly -- we don't *want* the two concepts to be treated as equivalent, because redirects become hard to edit.
On the other hand, what exactly are the problems that your suggestion is meant to solve?
On Mon, Oct 4, 2010 at 5:27 AM, Alex Brollo alex.brollo@gmail.com wrote:
:-) Yes, they just exist for that... but in my view of "layman database manager" I learn by experience a rule of relational databases: NEVER link to variable fields of a table! Always link to id!
There are two separate concepts here: "the article called [[Bear]]" (identified by title, or actually namespace+title), and "the article with the text and history that currently resides under the name [[Bear]]" (identified by id). When we want to refer to an article by a particular name, whatever its current contents, we use namespace+title; when we want to refer to a particular text and history, whatever its current name, we use id. If you look at the MediaWiki schema, you'll find that there are lots of places where we do both.
Alex Brollo wrote:
It's strange (but I guess that there's a sound reason) that plain wikilinks point to a variable field of wiki records (the name of the page) while many troubles would be solved, if they could point to the invariable field of such records: the id. The obviuos restult is, that all links are broken (and need fixing) as soon as a page is "moved" (t.i. renamed).
My question is: which is the sound reason for this strange thing? There's some idea about fixing this?
Alex
That's how it used to be before 1.5 There was a links table [1] and a brokenlinks table [2].
Then if a page was created/deleted/renamed all entries referring to it (which could be large) would need to be migrated/updated.
Using the pagelinks table avoids all these problems (at the cost of some more space needed for existing links).
Also see [3] and [4].
1- http://www.mediawiki.org/wiki/Manual:Links_table 2- http://www.mediawiki.org/wiki/Manual:Brokenlinks_table 3- http://www.mediawiki.org/wiki/Manual:Database_layout 4- http://lists.wikimedia.org/pipermail/wikitech-l/2005-May/017434.html
wikitech-l@lists.wikimedia.org