PDOException: SELECT COUNT(*) AS expression FROM {block} block WHERE (module = :db_condition_placeholder_6) AND (delta = :db_condition_placeholder_7) AND (status = :db_condition_placeholder_8) - Array ( [:db_condition_placeholder_6] => user [:db_condition_placeholder_7] => online [:db_condition_placeholder_8] => 1 ) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dp7.block' doesn't exist in system_performance_settings() (line 1306 of E:\phpnow\htdocs\dp7\modules\system\system.admin.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

reus’s picture

Assigned: reus » Unassigned
taz88ny’s picture

Assigned: Unassigned » taz88ny
stewsnooze’s picture

Assigned: taz88ny » Unassigned

subscribe

taz88ny’s picture

Assigned: Unassigned » taz88ny
Status: Active » Needs review
FileSize
1.46 KB

I added a condition to check if the table exists before attempting to run the query.

Not all modules have to be disabled and uninstalled, only the blocks module needs to be uninstalled to reproduce the error.

taz88ny’s picture

FileSize
1.75 KB

Indented the code inside of the condition I added.

taz88ny’s picture

Status: Needs review » Needs work
taz88ny’s picture

Status: Needs work » Needs review
netaustin’s picture

  1. The else { should be on its own line.
  2. I'm thinking you should use module_exists() rather than db_table_exists()

Otherwise, looks clean and the logic seems right.

netaustin’s picture

Status: Needs review » Needs work
taz88ny’s picture

FileSize
1.88 KB
taz88ny’s picture

Status: Needs work » Needs review

Applied changes recommended by netaustin.

sharda_ram’s picture

subscribe

Damien Tournoud’s picture

Title: When all modules are disabled & uninstalled, the menu: admin/settings/performance encountered an error » Move some code of system_performance_settings() to the block module
Status: Needs review » Needs work

All the code of system_performance_settings() that relates to the block module should be moved to the block module. More precisely: the block module should implement hook_form_system_performance_settings_alter(), and insert its own code inside the form.

taz88ny’s picture

I've applied the changes recommended by Damien Tournoud. The resulting description for the "caching mode" form on the "admin/settings/performance" page will be slightly different. What was once the second paragraph will now be the third. Let me know if this will be an issue.

taz88ny’s picture

FileSize
2.86 KB
taz88ny’s picture

Status: Needs work » Needs review
kresimir’s picture

subscribe

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community

It was as simple as that! Perfect, thanks taz88ny!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Yah. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.