Hi,

So I had a working website, except that I had a problem with views.module, which did not work to add a new view...
See http://drupal.org/node/49184

So I upgraded my common.inc module to the new HEAD one...
http://cvs.drupal.org/viewcvs/drupal/drupal/includes/common.inc?rev=1.51...

And now the "Home" link does not work anymore, when I click on it I stay on the same page, I do not go back to the home page of my website...

Thanks

Comments

Julien PHAM’s picture

After some investigation I noticed the problem comes from the function drupal_get_html_head function, so I looked after the differences between the two files.

The 1.511 version (the one which works and comes with Drupal 4.7 beta 4) looks like:

function drupal_get_html_head() {
  global $base_url;

  $output = "<m eta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
  $output .= "<base href=\"$base_url/\" />\n";
  $output .= theme('stylesheet_import', 'misc/drupal.css');

  return $output . drupal_set_html_head();
}

The 1.515 version (latest HEAD which does not work) looks like:

function drupal_get_html_head() {
  $output = "<m eta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
  $output .= theme('stylesheet_import', base_path() .'misc/drupal.css');
  return $output . drupal_set_html_head();
}

So I changed the function like this:

function drupal_get_html_head() {
  global $base_url;
  $output = "<m eta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
  $output .= "<base href=\"$base_url/\" />\n";
  $output .= theme('stylesheet_import', base_path() .'misc/drupal.css');
  return $output . drupal_set_html_head();
}

In fact I did a mix between the two versions. And now I have the correct home path, and the add view still works.
But I'm not a specialist, so I'm afraid what I did could have bad consequences on other modules, so if a specialist could look after this function and tell me how to fix it.

Thanks

Tobias Maier’s picture

we dont use anymore <base>
read this: http://drupal.org/node/22218#base

maybe you have to update your module and drupal core...

Tobias Maier’s picture

btw. the new path for the front-page is <front>

Julien PHAM’s picture

What module are you talking about?
The problem occurs when I installed 1.515 version of common.inc over my 4.7 beta 4 version of drupal...
So, what do I have to upgrade so the home page will work even with the 1.515 version of common.inc?

heine’s picture

Category: bug » support

For one, I wouldn't mix different versions eg use Beta 4 but only common.inc from HEAD. Removal of the base tag is a quite significant change. Because base is no longer used, modules must be adapted as well.

Julien PHAM’s picture

So, I should upgrade my drupal site to CVS HEAD version?
How do I do this, without copying all the files one by one?

Thanks

heine’s picture

Can't really say; what do you want to do with your site?

Julien PHAM’s picture

I'm trying to have the lastest version for now... my site is not in production, I'm migrating from SPIP to drupal, so for now I'm testing drupal, I'm creating my articles, and once my site will be ready I'll replace SPIP website by this one...

I'm currently upgrading it to latest CVS... because I need the insert view module, and this module does not exist in 4.6.5... and the latest CVS is far cooler than the 4.6.5 ;)

Julien PHAM’s picture

Status: Active » Closed (fixed)