http://www.perlmonks.org?node_id=530691


in reply to Batch of improvements applied

tye, you just pegged the karma meter, I'm sure!

It used to be that 12345 would first look for nodes titled "12345" and only go to node ID 12345 if no matching title was found.

So, what happens to nodes that are titled "12345"? Doesn't this change make it impossible to link to such a node by title? (And, uh... is that bad? ;-)

We're building the house of the future together.

Replies are listed 'Best First'.
Re^2: Batch of improvements applied (all-digit titles)
by tye (Sage) on Feb 16, 2006 at 17:04 UTC

    In order: They already sucked. Kinda, for now, or at least harder. No (it isn't bad).

    Mostly it's a "don't care". Long time ago I made it illegal to register a user with only digits in its name (and all of the previous all-digit user accounts have fallen into disuse). Since then we've only had a few cases of nodes with all-digit titles. One was from a meddler trying to abuse the 'feature' that I just 'fixed' (ie. removed) which got retitled after I complained. The others were from people trying to be helpful in covering up a bug of little consequence and these all now linger, making it harder for me to jump to node ID 1, etc.

    You can still link to such nodes by title using href://?node=title;type=nodetype (provided, of course, that you also specify the node's type). Long-ago plans include adding [title://...] links which would allow linking to nodes by title which can't currently be linked to by title (such as nodes with square brackets in their titles) and that would include this new set of "can't be easily linked to by title" nodes. This would also add a ?title= feature that would be like ?node= but without the DWIM (perhaps also not just running off and searching when you get the title wrong).

    And, of course, you can link to such nodes by ID (and do it even easier than before), which is what you should do anyway since such nodes are likely to get retitled anyway because all-digit titles suck. (:

    - tye        

Re^2: Batch of improvements applied
by ysth (Canon) on Feb 17, 2006 at 00:51 UTC

      I should update this logic so that if [9] contains a node_id that does not exist or that you don't have access to (and you haven't told 'search' to list nodes that you don't have access to), then instead of "none such" or "tough beans" you'll get title search behavior.

      - tye