In modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc option_definition defines 'vids' as NULL by default. This causes a foreach warning when drupal form api process #default_value of this form:
$form['vids'] = array(
'#prefix' => '<div><div id="edit-options-vids">',
'#suffix' => '</div></div>',
'#type' => 'checkboxes',
'#title' => t('Vocabularies'),
'#options' => $options,
'#default_value' => $this->options['vids'],
'#process' => array('expand_checkboxes', 'views_process_dependency'),
'#dependency' => array(
//'edit-options-argument-default-taxonomy-tid-limit' => array(1),
'edit-options-argument-default-taxonomy-tid-node' => array(1),
),
);
This patch is not needed in 2.x
| Comment | File | Size | Author |
|---|---|---|---|
| views-vocabulary-arg-notice.patch | 912 bytes | dagmar |
Comments
Comment #1
macdee commentedI don't know if this is related. I couldn't find a matching issue in the 6.x.2.x-dev queue which was the version I was experiencing a problem with and the problem I experienced still exists, at least in my environment, in the April 10 release of that, so this probably belongs there.
However, that said, the 6.x.3.x-dev code is similar in this respect and this is the only place I see any reference to problems with the views_plugin_argument_default_taxonomy_tid.inc file so I'm just throwing this idea out for your consideration.
Disclaimer: Feel free to discard this remedy as the only thing that's common seems to be the file involved and that it has something to do with the default state. I haven't used the 6.x.3.x-dev code yet.
I was having problems with views_plugin_argument_default_taxonomy_tid.inc but in my case I was getting a default argument not found when trying to create a taxonomy argument in views2. I can't remember if there was also a foreach warning.
The fix I employed (and I had to do this again with the latest release of 6.x.2.x-dev) was to add 'parent' => 'fixed', to the function taxonomy_views_plugins() in the 'taxonomy_tid' array (after line 454 in the April 10 release of .2 dev - it would be after line 484 in .3 alpha3) in the file "taxonomy.views.inc" because the file "views_plugin_argument_default_taxonomy_tid.inc' wasn't picking up the ...extends views_plugin_argument_default part of the declaration.
Comment #2
dawehnerSure checkboxes needs an array as default argument.
Comment #3
willazilla commentedI followed from another issue. My Calendar data stopped showing up after I upgraded to Drupal 6.16, and I went to look at the view. There is an error: "warning: Invalid argument supplied for foreach() in .../includes/form.inc on line 1207." Is there a patch or some other action I can take to get the functionality back?
Comment #4
dawehner@willazilla
The patch is there, see above.
Comment #5
willazilla commentedThanks!!
Comment #6
YK85 commentedsubscribing
Comment #7
merlinofchaos commentedCommited to all 3.x branches. Thanks!
Comment #8
kenorb commentedThanks.
It's possible to publish 6.x-3.x-dev on the project page?
Comment #9
dawehnerYou can find the release at http://drupal.org/node/38878/release