During testing I wanted to reinstall Drupal. So I just removed all tables from the database to re-run the installation. Because my database settings haven't changed, I decided to leave the settings.php intact. I'd expect that I'd be redirected to install.php, but instead Drupal fires a huge (ugly) warning.

I know that removing settings.php or the database settings resolves this issue, but that's not what I expected.
Wouldn't it be a simple check to see if we can connect to the database, but that the tables don't exists? And if so, redirect?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BarisW’s picture

Component: install system » database system
Status: Active » Needs review
FileSize
979 bytes

So, here is a patch. It involves bootstrap, and I'm not sure if this is the best way to do it.
But it works.

Some DB guru should have a look I guess ;)

BarisW’s picture

Priority: Normal » Minor

On the other hand, if this is a performance hit, we might leave it like this.
Developers might just visit install.php and ignore the error warning.

Crell’s picture

Status: Needs review » Closed (won't fix)

Yes, this adds a query super-early in the bootstrap that we cannot get around. The trigger for "needs install" is actually the settings file, not the database, for that reason. Let's leave that as is.

Damien Tournoud’s picture