I have noted similar issues with earlier versions of views, hough noted it with an upgrade to 6.2.6

Table 'xxx.cache_views_data' doesn't exist query: DELETE FROM cache_views_data in xxx/includes/cache.inc on line 172.

I have not noted any direct impact on the site's function...

Comments

merlinofchaos’s picture

cache_views_data is created via an update in 2.6. Did you run update.php? If so you may need to go back and re-run the last update in Views I think.

avolve’s picture

Status: Active » Closed (fixed)

Thanks merlin — re-running the update has resolved this.

bay6’s picture

Same problem but rerunning update.php didn't solve the problem. To resolve this I had to uninstall Views then reinstall.

ferrangil’s picture

Yes, re-running update.php worked for me (I had some problems with the date module and it's updates... so maybe views didn't update well initially). No more issues now.

AgentD’s picture

I'm now having this issue, and seems to be affecting creation of new views.

I'm using 2.6, and was getting this error. I re-ran the update and that didn't work. I then uninstalled Views, reinstalled and tried recreating a View.

I cannot create views now, when trying to add a field to a block view I get this error:
* Display "Defaults" uses fields but there are none defined for it or all are excluded.
* Display "Block" uses fields but there are none defined for it or all are excluded.
Along with this error in a pop-up:
An error occurred at http://xxx.com/admin/build/views/ajax/add-item/xxx/block_1/field.

I looked at the log for the uninstall of Views and found this error:
Unknown table 'cache_views_data' query: DROP TABLE cache_views_data in /home/xxx/public_html/includes/database.mysql-common.inc on line 261.

Stuck on what to do now.

Help is greatly appreciated (I'm using Drupal 6.14).

jwilson3’s picture

Issue summary: View changes

Really old issue, but if you come across this, and need a quick fix: create a file in the Drupal site root called fix-cache-views-data.php with the following content:


define('DRUPAL_ROOT', getcwd());

require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

  $table = drupal_get_schema_unprocessed('system', 'cache');
  $table['description'] = 'Cache table for views to store pre-rendered queries, results, and display output.';
  $table['fields']['serialized']['default'] = 1;
  db_create_table('cache_views_data', $table);

Then execute it using drush or access it via the web browser:

drush @mysite scr fix-cache-views-data.php