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?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | views-upgrade.patch | 764 bytes | JirkaRybka |
Comments
Comment #1
yched commentedhave you run the Views updates in update.php ?
Comment #2
joel_guesclin commentedIn 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.
Comment #3
joel_guesclin commentedIn 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.
Comment #4
dh@tbed.org commentedsame 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.
Comment #5
jbudisantosa commentedThis 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 */ ");
Comment #6
merlinofchaos commentedThis should be fixed by 1.6-beta5.
Comment #7
JirkaRybka commentedRecently, 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.
Comment #8
redraven commentedI recently upgraded a site from 4.7 with views 1.6 to 5.2 with views 1.6
This problem still exists.
Comment #9
sunAnd did you apply the patch in front of upgrading?
Comment #10
jweowu commentedThis 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.
Comment #11
fgmSimilar 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.
Can be reproduced afterwards by:
Errors obtained:
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.
Comment #12
fgmChanging status. I leave this about updates because the problem did not seem to happen with 6.2.5 (not sure, though).
Comment #13
jweowu commentedfgm: 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.
Comment #14
fgmWell, 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.
Comment #15
merlinofchaos commentedre-open assumes the previous issue was closed. It was not.
Comment #16
esmerel commentedAt this time, only security fixes will be made to the 5.x version of Views.