Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291783

Revisiting the Install Page after an install often produces a blank page.

$
0
0

Description

After installing Drupal, revisiting the install page renders a blank page.

The Problem

It seems, the user_template_preprocess_default_variables_alter is tring to clone the $user variable without checking to make sure it has been initialized.

Reproducing the problem

This one is pretty easy to reproduce. Install a fresh copy of drupal and visit the newly installed site. Next, go back and visit the install page and you will get a blank page.

The Solution

Check for the $user variable first.

+  // Make sure the user object exists.
+  if (!isset($user)) { $user = drupal_anonymous_user(); }
+
   $variables['user'] = clone $user;

Conclusion

Whether or not this function should ever be called during the installation process is one issue but since cloning an uninitialized variable causes php to fault and exit (at least it does on my system), it's probably a good idea to make sure it is initialized first.


Viewing all articles
Browse latest Browse all 291783

Trending Articles