Download & Extend

/title/something should redirect to /node/1234 instead of displaying the node by itself

Project:Title
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Since users tend to link to what's in their URL bar, it would be desirable if the permanent (/node/something) URL was in the URL bar even if they arrived via a /title/something link. The attached patch fixes this.

This also fixes this bug.

AttachmentSizeStatusTest resultOperations
title-2005-01-05-redirect-v01.patch576 bytesIgnored: Check issue status.NoneNone

Comments

#1

Version:<none>»

I have been using drupal_goto() instead of head() (in drupal 4.6.3) as it recomends in drupaldocs.org:

It is advised to use drupal_goto() instead of PHP's header(), because drupal_goto() will append the user's session ID to the URI when PHP is compiled with "--enable-trans-sid".

The code will be as follows (starting in line 45):

<?php
else if (db_num_rows($result) == 1) {
 
$node = db_fetch_object($result);
 
//$node = node_load(array('nid' => $node->nid));
  //print theme('page', node_show($node, NULL), $node->title);
 
drupal_goto("node/".$node->nid); //better take you to the page instead of loading the page ;-)
 
}
?>

#2

Status:needs review» reviewed & tested by the community

Oh =) It does work now.. Strange, last I tried it didn't... Thanks for the patches

#3

ugh sorry, my last comment was meant for this thread: http://drupal.org/node/31069

#4

Status:reviewed & tested by the community» needs review

why not changing this back to code need review?

#5

Status:needs review» closed (won't fix)

The original Title module for Drupal 4.6 is obsolete, and going to be replaced with a completely different module.

nobody click here