Once I added a Filter into my views (the field is a text data), I'm getting whole lot of error as shown in the attachment..:(

warning: implode() [function.implode]: Invalid arguments passed in D:\Server Root\WWW\motorspot\sites\all\modules\views\includes\filter.handlers.inc on line 843.

Is there a solution to this problem? I can't get any filters to be exposed.

CommentFileSizeAuthor
screenshot.png32.82 KBktleow

Comments

deejmer’s picture

Title: warning: implode() [function.implode]: Invalid arguments passed... » same issue here...

Subscribing

bdragon’s picture

Title: same issue here... » warning: implode() [function.implode]: Invalid arguments passed...

Thou shalt not gimp the issue title.

merlinofchaos’s picture

Please try the -dev version; I've fixed an issue very much like this. (You can find the 6.x-2.x-dev version by clicking on 'view all releases' and searching for "6.x-2.x-dev")

Markpanzee’s picture

I get a similar error:

warning: implode() [function.implode <http://dsp0.rice.edu/function.implode>]: Invalid arguments passed in /opt/www/sites/all/modules/views/includes/plugins.inc(3840) : eval()'d code on line 4. 

The error doesn't occur on every machine (in fact, it only seems to occur when viewing the site from one computer that I know of).

I tried updating to the dev version, but the error remains. My view doesn't have any filters, but I am guessing the error is caused by the arguments I am setting. It's a block view, and I use php code to set the arguments - what I want to do is just grab the taxonomy terms for the current page and display a list of related pages.

In case it is useful, here is the export of the view.


$view = new view;
$view->name = 'group_nodes';
$view->description = 'List of other nodes from the same group';
$view->tag = 'group';
$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(
  'title' => array(
    'label' => '',
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'tid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => '',
    'wildcard_substitution' => '',
    'title' => '',
    'default_argument_type' => 'php',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 1,
    'add_table' => 0,
    'require_value' => 0,
    'reduce_duplicates' => 0,
    'set_breadcrumb' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '$node = node_load(arg(1));
    if($node) {
      foreach($node->taxonomy as $term) { $terms[] = $term->tid; }
      return implode (\'+\',$terms);
    } else { return; }',
    'validate_argument_node_type' => array(
      'forum' => 0,
      'course' => 0,
      'event' => 0,
      'event_feed' => 0,
      'feedapi_node' => 0,
      'news' => 0,
      'page' => 0,
      'publication' => 0,
      'pub_feed' => 0,
      'research_area' => 0,
      'research_project' => 0,
      'software' => 0,
      'wiki_page' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '5' => 0,
      '4' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_php' => '',
  ),
  'nid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'default_argument_type' => 'node',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 1,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'forum' => 0,
      'course' => 0,
      'event' => 0,
      'event_feed' => 0,
      'feedapi_node' => 0,
      'news' => 0,
      'page' => 0,
      'publication' => 0,
      'pub_feed' => 0,
      'research_area' => 0,
      'research_project' => 0,
      'software' => 0,
      'wiki_page' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '5' => 0,
      '4' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_php' => '',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);

merlinofchaos’s picture

warning: implode() [function.implode
]: Invalid arguments passed in
/opt/www/sites/all/modules/views/includes/plugins.inc(3840) : eval()'d
code on line 4.

That says that the PHP code it's trying to evaluate is failing. That means it's user entered code, not Views at all. It's not a similar error.

Markpanzee’s picture

Correct. PHP error was caused by the fact that the Taxonomy Access Control module was not "listing" the taxonomy terms I was trying to pull from the node, so users without sufficient permissions couldn't didn't get any terms. Sorry to bother everyone.

merlinofchaos’s picture

Status: Active » Fixed

ktleeow: I believe I have this fixed. At least, I had an error -- actually a very different error -- when I imported your view. I fixed that error and the view appears to work normally for me now.

Please let me know if the -dev version fixes this for you (note -dev is only packaged every 12 hours so it may be a few hours before you can access this commit through -dev; if you can get Views from CVS you can test more quickly).

ktleow’s picture

That view above was not mine. Its by Markpanzee.

I got the error above when I used imce_image cck field. After that, I deleted that and used imagefield. No more problems.
I guess it could be imce's argument problems..

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Anonymous’s picture

Markpanzee thank you. your code helped me with this :

From:
return implode ('+',$terms);

To
return implode (\'+\',$terms);