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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kurkuma’s picture

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):

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 ;-)
  }
cybe’s picture

Status: Needs review » Reviewed & tested by the community

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

cybe’s picture

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

Tobias Maier’s picture

Status: Reviewed & tested by the community » Needs review

why not changing this back to code need review?

sun’s picture

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.