After updating views I have one view that has disappeared (CCK rc7, views dev 10th sep, date dev 10th sep)

View export at end of post.

The SQL for the block view is

SELECT node.nid AS nid, node_data_field_start.field_start_value AS node_data_field_start_field_start_value, node_data_field_start.field_start_value2 AS node_data_field_start_field_start_value2, node.title AS node_title, node.type AS node_type, node_data_field_start.nid AS node_data_field_start_nid FROM node node LEFT JOIN content_type_event node_data_field_start ON node.vid = node_data_field_start.vid WHERE (node.status <> 0) AND (node.type in ('event')) AND (DATE_FORMAT(node_data_field_start.field_start_value, '%Y-%m-%d') > '2008-09-11') ORDER BY node_data_field_start_field_start_value ASC

In MySQL directly this returns 4 rows. In the edit view preview - nothing.

The block has also disappeared in the list of available blocks under admin/build/block

$view = new view;
$view->name = 'upcoming';
$view->description = 'Upcoming';
$view->tag = 'Longship';
$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',
  ),
  'field_start_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'short',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_start_value',
    'table' => 'node_data_field_start',
    'field' => 'field_start_value',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'field_start_value' => array(
    'order' => 'ASC',
    'id' => 'field_start_value',
    'table' => 'node_data_field_start',
    'field' => 'field_start_value',
    '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(
      'event' => 'event',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '>',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'date_fields' => array(
      'node_data_field_start.field_start_value' => 'node_data_field_start.field_start_value',
    ),
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('title', 'Kommende arrangementer');
$handler->override_option('items_per_page', 5);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
  'type' => 'ul',
));
$handler = $view->new_display('block', 'Blokk', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);

Comments

merlinofchaos’s picture

Hmm. I don't see anything wrong with that view. I can't imagine why it is causing a problem. Do you have errors in your php or watchdog logs?

chrissearle’s picture

No - nothing there :(

But - and now I am extremely confused - I just tried the following.

Opened view.

On the defaults - hit the analyze - got the response nothing to report - and the preview of the default showed the four rows suddenly.

Went to blocks - no block

Back to the view and I get the following block (most if it removed as when it was all here the comment would not display).

I am wondering what on earth menu_router has to do with views blocks now.

user warning: Duplicate entry 'node' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('node', '', '', 'user_access', 'a:1:{i:0;s:14:\"access content\";}', 'node_page_default', 'a:0:{}', 1, 1, '', 'node', 'Content', 't', '', 4, '', '', '', 0, '') in /srv/www/www.longship.org/htdocs/includes/menu.inc on line 2371.
user warning: Duplicate entry 'rss.xml' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('rss.xml', '', '', 'user_access', 'a:1:{i:0;s:14:\"access content\";}', 'node_feed', 'a:0:{}', 1, 1, '', 'rss.xml', 'RSS feed', 't', '', 4, '', '', '', 0, '') in /srv/www/www.longship.org/htdocs/includes/menu.inc on line 2371.
user warning: Duplicate entry 'sitemap.xml' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('sitemap.xml', '', '', 'user_access', 'a:1:{i:0;s:14:\"access content\";}', '_xmlsitemap_output', 'a:0:{}', 1, 1, '', 'sitemap.xml', 'Site map index', 't', '', 4, '', '', '', 0, '') in /srv/www/www.longship.org/htdocs/includes/menu.inc on line 2371.
user warning: Duplicate entry 'admin' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('admin', '', '', 'user_access', 'a:1:{i:0;s:27:\"access administration pages\";}', 'system_main_admin_page', 'a:0:{}', 1, 1, '', 'admin', 'Administer', 't', '', 6, '', '', '', 9, 'modules/system/system.admin.inc') in /srv/www/www.longship.org/htdocs/includes/menu.inc on line 2371.
user warning: Duplicate entry 'blog' for key 1 query: INSERT INTO menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('blog', '', '', 'user_access', 'a:1:{i:0;s:14:\"access content\";}', 'blog_page_last', 'a:0:{}', 1, 1, '', 'blog', 'Blogs', 't', '', 20, '', '', '', 0, 'modules/blog/blog.pages.inc') in /srv/www/www.longship.org/htdocs/includes/menu.inc on line 2371.
chrissearle’s picture

Hmm - tried deleting it - and recreating it.

Added the view - set all the defaults - went to add the block view.

The add display drop down gives me two options - Date browser and Feed. Block has gone.

merlinofchaos’s picture

There is something wrong with your installation. I can't duplicate this behavior on my test setup.

chrissearle’s picture

I'd guessed that - but I have no idea what :(

I don't mind adding debugging etc - but - views is pretty big - any hints as to where to start? I'm guessing the population of the display dropdown would be good.

merlinofchaos’s picture

Yea. I would start by making sure that your plugins/views_plugin_display_block.inc actually exists and isn't corrupted. I'll see if I can think of some more advice later, but my brain is locked onto something else just now and this is an easy place to start.

chrissearle’s picture

Hmm.

I'm beginning to suspect calendar again.

I scratched the views dir and grabbed the 11th sep dev tarball.

No change.

If I disable calendar - I get all things back, block, page etc.

I suspect that calendar (which is still giving me some odd "can't load views-view.tpl.php" errors) is at fault here. See http://drupal.org/node/303999

chrissearle’s picture

Still seeing this issue with calendar (now on http://drupal.org/node/314196).

The oddity is only on one site of three - all on the latest RC of cck, date, calendar and views.

Because of that - I am suspecting that its something in the database (just a guess) since a recursive diff of the files on the system isn't showing anything.

When testing - I have turned off the views cache, and emptied all cache* tables.

Just wanted to ask - is that enough? Does that force views to reload its plugins from scratch? Because it doesn't seem to fix the issue.

My next step is to rebuild the site from scratch (empty 6.4, add all modules and data types then run an SQL level migration of content) so I'd kind of like to eliminate all other options first - so if there are any other debugging options open please do say :)

merlinofchaos’s picture

Yes, turning off Views caching means it will read all its data (plugins, handlers, default views, etc) every page load that a view is invoked.

One thing that might be interesting is doing a little devel.module debugging inside the views_block function with dsm() and see what's actually being returned there. From your descriptions I'm thinking this probably isn't Views, but it's a very strange way for something to cause Views to fail.

merlinofchaos’s picture

Note that calendar module has been a little squirrelly for awhile, and it could easily be part of the problem as well.

chrissearle’s picture

Well aware of that :) Although I will say that KarenS has done a very good job with the latest RC build (apart from my one main site of course).

I've started testing with a scratch 6.4 - configure up and set all building blocks then SQL migrate data. So far its looking good. It may be an inconsistency in my 4.6 > 4.7 > 5.0 > ... > 5.10 > 6.4 upgraded database.

I will feed back both on this and on my calendar issue when that's done (I'm also going to see if I can see differences in the database if I get it working - I would _love_ to know what it was even when I have it fixed). However - with a 4 year old birthday this weekend - that will have to wait.

domesticat’s picture

Status: Active » Closed (fixed)

Closed while closing all Views support requests with no activity for 6 months. If you still need help, you may re-open this issue at any time.