I have just upgraded my site from Drupal 4.7 to 5.1. When I install the Views module in Drupal 5.1 (having used it already in 4.7), I get a lot of messages saying that "user warning: Table 'db_upgrade.cache_views' doesn't exist". What is the matter? This is critical since I cannot use Views or indeed anything else - when was this "cache_views" table introduced into Views?

CommentFileSizeAuthor
#7 views-upgrade.patch764 bytesJirkaRybka

Comments

yched’s picture

have you run the Views updates in update.php ?

joel_guesclin’s picture

In effect, this seems to be a very similar problem to the one that I have reported with CCK. The error occurs when installing the module (ie, I check the "Views" modules, press submit, and get the error message). I then run update.php - but this does not get rid of the error.
In what version was the "cache_views" table introduced? If I upgrade to that version first, then perhaps it will install the cache_views table properly.

joel_guesclin’s picture

In effect, this seems to be a very similar problem to the one that I have reported with CCK. The error occurs when installing the module (ie, I check the "Views" modules, press submit, and get the error message). I then run update.php - but this does not get rid of the error.
In what version was the "cache_views" table introduced? If I upgrade to that version first, then perhaps it will install the cache_views table properly.

dh@tbed.org’s picture

same problem here - upgraded to 5.1, never had views before. these warnings appear as soon as the views folder is copied to the server -- before enabling or running update.php.

jbudisantosa’s picture

This issue has been discussed at http://drupal.org/node/130157
I have to manually create cache_views table to solve the problem.
Please take a look at views.install :

db_query("CREATE TABLE {cache_views} (
cid varchar(255) NOT NULL default '',
data longblob,
expire int NOT NULL default '0',
created int NOT NULL default '0',
headers text,
PRIMARY KEY (cid),
INDEX expire (expire)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");

merlinofchaos’s picture

Status: Active » Fixed

This should be fixed by 1.6-beta5.

JirkaRybka’s picture

Version: 5.x-1.5 » 5.x-1.6
Status: Fixed » Needs review
StatusFileSize
new764 bytes

Recently, I was upgrading from 4.7.x (Views version: I'm not sure, sorry) to 5.x (Views 1.6-beta5, later 1.6). The cache-table was missing, I had to create it manually.

Now, looking into the views.install file, I see there's a function views_make_cache_table(), where it says in comments that this should go into all upgrades to ensure the table is created on all 4.7->5 upgrades.

But however, it is NOT included in upgrades 15 and 16, so I guess this might be the source of my problem. Attaching a patch, but please consider whether this is correct solution or not.

redraven’s picture

I recently upgraded a site from 4.7 with views 1.6 to 5.2 with views 1.6

This problem still exists.

sun’s picture

And did you apply the patch in front of upgrading?

jweowu’s picture

Status: Needs review » Reviewed & tested by the community

This is a continuing problem for anyone going through an upgrade from a 4.7 site.

Patch #7 reviewed, tested, confirmed to work.

Could it please be committed? As there is no functional change, you could simply re-release the result as version 1.6 again. If the release system doesn't allow for that, then a new minor release would be fine. Upgrading old sites is painful enough, without worrying about unnecessary errors that update.php doesn't fix.

fgm’s picture

Title: Problem with non-existent table on upgrading to Views 6.2.6 on Drupal 6.14 » Problem with non-existent table on upgrading to Drupal 5.1

Similar problem with Views 6.2.6 when installing from Drush (drush enable views): there is a cache_clear_all somewhere in the install process, starting with DELETE from {cache_views} and complaining that table cache_views does not exist, with further errors trying to insert into that table, which is created further down in the enabling process.

Steps to reproduce.

  1. clean core install
  2. install Drush
  3. drush enable views

Can be reproduced afterwards by:

  1. drush disable views
  2. drush uninstall views
  3. drush enable views

Errors obtained:

DELETE FROM cache_views in cache.inc line 172 (twice)
SELECT DISTINCT v.* FROM views_view v in view.inc line 1295
SELECT data, created, headers, expire, serialized FROM cache_views WHERE cid = 'views_default_views:en' in cache.inc line 26
UPDATE cache_views SET data = (lots of data) 

This being said, several (though not all) modules, including content (cck) exhibit the same behaviour, so it might be a drush pm issue instead of a View one.

fgm’s picture

Title: Problem with non-existent table on upgrading to Drupal 5.1 » Problem with non-existent table on upgrading to Views 6.2.6 on Drupal 6.14
Version: 5.x-1.6 » 6.x-2.6
Priority: Critical » Normal
Status: Reviewed & tested by the community » Active

Changing status. I leave this about updates because the problem did not seem to happen with 6.2.5 (not sure, though).

jweowu’s picture

Title: Problem with non-existent table on upgrading to Drupal 5.1 » Problem with non-existent table on upgrading to Drupal 5
Version: 6.x-2.6 » 5.x-1.6
Status: Active » Reviewed & tested by the community

fgm: Please note that changing the issue settings affects the ENTIRE issue (see top), not just your comments.

"Similar problem" implies that your problem should have been a new issue.

I'm reverting your settings changes, because this issue is for a problem with the Views 1 code base, not Views 2.

edit: Looking at your user profile makes me conclude that you knew exactly what you were doing, in fact, but I believe my point is still valid.

fgm’s picture

Well, practice with core is to reopen issue when "similar" problems reappear in a later version, as this /can/ point to a similar cause, helping in the resolution. But maybe merlin wants things done differently for his projects. Never mind.

merlinofchaos’s picture

re-open assumes the previous issue was closed. It was not.

esmerel’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

At this time, only security fixes will be made to the 5.x version of Views.