I am running drupal 5.3(just upgraded from 5.1) Mysql-4.1.15 php-4.4.2 CCK 5.x-1.6-1 VIEWS 5.x-1.6 all on linux and apache2

I have been running Drupal for a bit and recently decided to catch up on some maint(including CCK & VIEWS). Almost everything seems to have worked except for one of the views that I had previously created. Others are OK. I am now current on all modules according to the update report and Yes I did run the update after each module upgrade

This view is creating a block that was displaying a list of node type=projects(one of my new CCK types). Any time I try to display a page that contains this generated block. I get the following error msg in my apache log. All I get in my browser is a blank page.

[Sun Nov 18 00:27:56 2007] [error] [client 99.99.99.99] PHP Fatal error: Call to undefined function: () in /removed for security.../httpdocs/sites/default/modules/views/views.module on line 1581

I did a google search and only found one mention of this msg. Unfortunately that person solved their problem by deleting all their views, and it somehow related to usernode. I'm not, and haven't been using usernode.

I've tried clearing all the cache(devel module) I could find, but it didn't help. I also resubmitted the modules page as suggested. If I deactivate the block the previously failing pages display OK. If I duplicate the block-VIEW that is causing the problem and delete what is the offending Argument, block can be displayed but will of course not give me the formatting I want. I found that the Argument was the problem by sequentially removing options till the page displayed, and then cloning the VIEW again and then deleted the offending Argument option to make sure it was that one item and not a combo.

I then cloned it again and started looking closer at the Argument option. I then noticed that part of the option (the Argument type) was missing. I then tried to add a new Argument to recreate what used to be there. When I did this and looked at the list of fields that could be used for Argument type. The list presented was not as complete as it should be, many valid CCK fields were missing

any clues as to why not all the defined CCK fields are being displayed? If I display one of the nodes of nodetype projects the fields do display correctly, so they do still exist And even the now mis-formatted block will display the fields continent/country as part of individual records.

When I go into VIEWS and export the VIEW-block they are no longer the same. Here they both are. First the original

BTW the projects by Region in the top left corner is what it looked like when it worked before the upgrade. http://beta.sunflowerchildren.org/ver2CRM/projects/cambodia-hiv-aids-ped...

Original VIEWs-block

   $view = new stdClass();
  $view->name = 'project_grouping_block';
  $view->description = 'Projects grouped by region then country.';
  $view->access = array (
);
  $view->block = TRUE;
  $view->block_title = 'Projects by Region then Country';
  $view->block_header = '';
  $view->block_header_format = '1';
  $view->block_footer = '';
  $view->block_footer_format = '1';
  $view->block_empty = '';
  $view->block_empty_format = '1';
  $view->block_type = 'list';
  $view->nodes_per_block = '20';
  $view->block_more = TRUE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array (
    array (
      'tablename' => 'node_data_field_project_continent',
      'field' => 'field_project_continent_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_country',
      'field' => 'field_project_country_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_county',
      'field' => 'field_project_county_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_city',
      'field' => 'field_project_city_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_name',
      'field' => 'field_project_name_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'content: field_project_continent',
      'argdefault' => '4',
      'title' => '',
      'options' => '',
      'wildcard' => '*',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node_data_field_project_country',
      'field' => 'field_project_country_value',
      'label' => '',
      'handler' => 'content_views_field_handler_group',
      'sortable' => '1',
      'defaultsort' => 'ASC',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'projects',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node_data_field_project_continent, node_data_field_project_country, node_data_field_project_county, node_data_field_project_city, node_data_field_project_name, node);
  $views[$view->name] = $view;

======

New VIEWs-block

  $view = new stdClass();
  $view->name = 'project_grouping_block';
  $view->description = 'Projects grouped by region then country.';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = FALSE;
  $view->page_title = 'List of projects grouped by region.';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = 'There are currently no projects in this region or our database is under going maintenance.';
  $view->page_empty_format = '1';
  $view->page_type = 'list';
  $view->url = 'view/projects';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->block = TRUE;
  $view->block_title = 'Projects by Region then Country';
  $view->block_header = '';
  $view->block_header_format = '1';
  $view->block_footer = '';
  $view->block_footer_format = '1';
  $view->block_empty = '';
  $view->block_empty_format = '1';
  $view->block_type = 'list';
  $view->nodes_per_block = '20';
  $view->block_more = TRUE;
  $view->block_use_page_header = FALSE;
  $view->block_use_page_footer = FALSE;
  $view->block_use_page_empty = FALSE;
  $view->sort = array (
    array (
      'tablename' => 'node_data_field_project_continent',
      'field' => 'field_project_continent_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_country',
      'field' => 'field_project_country_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_county',
      'field' => 'field_project_county_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_city',
      'field' => 'field_project_city_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
    array (
      'tablename' => 'node_data_field_project_name',
      'field' => 'field_project_name_value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'content: field_project_continent',
      'argdefault' => '4',
      'title' => '',
      'options' => '',
      'wildcard' => '*',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node_data_field_project_country',
      'field' => 'field_project_country_value',
      'label' => '',
      'handler' => 'content_views_field_handler_group',
      'sortable' => '1',
      'defaultsort' => 'ASC',
      'options' => 'default',
    ),
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'projects',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node_data_field_project_continent, node_data_field_project_country, node_data_field_project_county, node_data_field_project_city, node_data_field_project_name, node);
  $views[$view->name] = $view;

===============

Just to keep folks from having to dig. The RETURN statement is line 1581

/**
* Get the summary link for a view.
*/
function views_get_summary_link($argtype, $item, $base) {
  $arginfo = _views_get_arguments();
  return $arginfo[$argtype]['handler']('link', $item, $argtype, $base);
}

===============

Any and all clues, things to check, etc appreciated.

Comments

MacRonin’s picture

StatusFileSize
new68.33 KB
new52.78 KB
new74.37 KB
new39.36 KB

To try and make this mess easier to visualize I have screen-shots of the offending VIEW before and after the upgrade.

Old-Argument-display.jpg Show what it looked like when things worked before the upgrade
Old-Field-select-list.jpg Shows the full select list before the upgrade

New-Argument-display.jpg Shows the partially completed Argument display after upgrade.
Notice the area circled in red
New-Field-select-list.jpg Show the much smaller field display after upgrade

This is not a new VIEW. It was in place and working fine before the upgrade(s)
BTW the projects by Region in the top left corner is what it looked like when it worked before the upgrade.
http://beta.sunflowerchildren.org/ver2CRM/projects/cambodia-hiv-aids-ped...

MacRonin’s picture

Category: support » bug

OK I've been digging all over the place and can't find anything that I might be doing wrong or forgot to do during the upgrade so I am going to switch this to a bug report instead of just a support request. I had been pretty sure I hadn't missed anything since this had been working fine prior to the upgrade.

MacRonin’s picture

Still digging, but this issue over on the DATE module sounds suspiciously similar. And I did just upgrade DATE also.

http://drupal.org/node/189093

MacRonin’s picture

Status: Active » Postponed (maintainer needs more info)

I don't know exactly what code (on whose end) is causing the problem. But disabling DATE got my functionality back. It is also still working after dropping back to DATE1.6 So the problem lies someplace in the interaction between VIEWS and DATE 1.7

The DATE 1.7 module does have two mentions of interactions with the VIEWS cache.

bassio’s picture

Yes same here.

I rolled back to the previous date and calendar and the issue disappeared.

I assume one of these are causing the exception.

So maybe views is innocent after all.

MacRonin’s picture

superkc9 also posted a possibility over in a thread I started in the forums. ( http://drupal.org/node/193286#comment-641389 )

===============

I had a problem with not all CCK fields showing up in the Views argument field list, as well. After some testing, I found that if I changed line 188 of content_views.inc in the CCK module from

  foreach (content_fields() as $field) {

  ...
  }  

to

  $fields = content_fields();
  foreach ($fields as $field) {

  ...
  }  

For whatever reason, not all of the fields were returned if the content_fields() was called in the foreach statement, but they are if first assigned to a variable.

I don't know if this will solve your problem or not, but it worked for me.

karens’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This has been reported in several places but I can't replicate it on my own installation. At any rate, we don't need lots of reports of the same problem in different places, we'll use the Date module issue as the place to work on this, http://drupal.org/node/189093.

karens’s picture

Just posting this for anyone who was tracking this issue. I finally found the problem and a fix, which was just committed to the Date module dev version for all branches (4.7, 5.x, and HEAD). It will be available immediately if you get it from cvs, otherwise should show up in the dev tarball tomorrow. If I get reports back on http://drupal.org/node/189093 that the fix is working right, I'll create a new official Date module release with the fix.