First great idea on the module!
I got this error on my production system (linux), then I recreated the error on a fresh 6.19 install (on mac os x) that only has these basic modules enabled. Any ideas? Thankx.
#modules
garland,system,block,dblog,filter,help,menu,node,update,user,demo,
views - 6.x-2.11
views_ui - 6.x-2.11
views_content_cache - 6.x-2.2
ctools - 6.x-1.7
#XAMMP on Mac
Apache/2.2.11 (Unix) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8l PHP/5.2.9 mod_perl/2.0.4 Perl/v5.10.0
#This is the error I get when clicking on Update after choosing "content-based" from the caching options:
* warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/my/sandbox/includes/form.inc on line 1211.
* warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/my/sandbox/includes/form.inc on line 1211.
#FROM form.inc:
1207 function form_type_checkboxes_value($form, $edit = FALSE) {
1208 if ($edit === FALSE) {
1209 $value = array();
1210 $form += array('#default_value' => array());
1211 foreach ($form['#default_value'] as $key) {
1212 $value[$key] = 1;
1213 }
1214 return $value;
1215 }
1216 elseif (!isset($edit)) {
1217 return array();
1218 }
1219 }
The View I'm using on the fresh system when trying to enable the content-based cache is:
$view = new view;
$view->name = 'blogs';
$view->description = 'blogs';
$view->tag = 'test';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'teaser' => array(
'label' => 'Teaser',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'teaser',
'table' => 'node_revisions',
'field' => 'teaser',
'relationship' => 'none',
),
'title' => array(
'label' => 'Title',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'story' => 'story',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
Comments
Comment #1
jeni_dc commentedI've got the same error, caching seems to be working as expected, though. 6.19 here as well with views 6.x-2.11
If you want any more info just let me know.
Comment #2
jasont28 commentedI too am seeing this error. If you want to see an export of the view let me know.
I'm running Views 6.x-2.11 and Views Content Cache 6.x-2.2
Comment #3
steven jones commentedSuspect that this foreach error was fixed in #874492: Views 3 compatibility
Comment #4
gg4 commentedError present in Views 6.x-2.12 and Views Content Cache 6.x-2.2