after importing a view when I click save it gives me error

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'is_cacheable' at row 1: 
INSERT INTO {views_view} (name, description, tag, view_php, base_table, is_cacheable) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); 
Array ( 
  [:db_insert_placeholder_0] => calendar_catalog 
  [:db_insert_placeholder_1] => My Title [:db_insert_placeholder_2] => 
  [:db_insert_placeholder_3] =>   
  [:db_insert_placeholder_4] => node 
  [:db_insert_placeholder_5] => 
) 
in views_db_object->save_row() (line 1632 of /Users/slim/Sites/d7/sites/all/modules/views/includes/view.inc).
CommentFileSizeAuthor
#5 views-646662-2.patch662 bytesxslim
#1 views-646662.patch647 bytesxslim

Comments

xslim’s picture

StatusFileSize
new647 bytes

Quick & dirty fix for this - is to add

if ($field == 'is_cacheable' && empty($this->$field)) $this->$field = 0;

inside function save_row in file view.inc

xslim’s picture

Status: Active » Needs review
dagmar’s picture

Status: Needs review » Needs work

@xslim: please respect the Coding Standars.

dawehner’s picture

I'm not sure, but this is used nowhere, and i thought earl would like to drop it anyway...
The patch has a codestyle problem, we always use {}

xslim’s picture

Status: Needs work » Needs review
StatusFileSize
new662 bytes

Sorry for that, fixed
dereine, what do you mean that it is used nowhere?

dawehner’s picture

i mean no-where

xslim’s picture

well should we remove is_cacheable from all sources?
I can remove it and make a patch if it's ok.

dawehner’s picture

I would first like to ask merlinofchaos.

I don't see a reason why it should be in. We have a pluggable cache plugin which allows everything.

xslim’s picture

Than I'll wait your answer.

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev

He pointed to http://drupal.org/node/635336

First create a patch fo 6.x

merlinofchaos’s picture

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

There's no point in this patch with #635336: Remove unused fields from the view out there.