On the clear site with some nodes with Date field I configured view which return all node titles. When I added the date field to the view, the view will return nothink.
Export of view:
$view = new view;
$view->name = 'deals';
$view->description = '';
$view->tag = '';
$view->base_table = 'node';
$view->human_name = 'deals';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Pole: Uzly: Nadpis */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 1;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Pole: Fields: field_date */
$handler->display->display_options['fields']['entity_id']['id'] = 'entity_id';
$handler->display->display_options['fields']['entity_id']['table'] = 'field_data_field_date';
$handler->display->display_options['fields']['entity_id']['field'] = 'entity_id';
$handler->display->display_options['fields']['entity_id']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['trim'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['entity_id']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['entity_id']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['entity_id']['alter']['html'] = 0;
$handler->display->display_options['fields']['entity_id']['element_label_colon'] = 1;
$handler->display->display_options['fields']['entity_id']['element_default_classes'] = 1;
$handler->display->display_options['fields']['entity_id']['hide_empty'] = 0;
$handler->display->display_options['fields']['entity_id']['empty_zero'] = 0;
$handler->display->display_options['fields']['entity_id']['settings'] = array(
'format_type' => 'long',
'fromto' => 'both',
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'show_repeat_rule' => 'show',
);
/* Filtr: Uzly: Typ */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'article' => 'article',
);
/* Display: Stránka */
$handler = $view->new_display('page', 'Stránka', 'page_1');
$handler->display->display_options['path'] = 'deals';
$translatables['deals'] = array(
t('Defaults'),
t('more'),
t('Apply'),
t('Reset'),
t('Sort By'),
t('Asc'),
t('Desc'),
t('Items per page'),
t('- All -'),
t('Offset'),
t('Nadpis'),
t('field_date'),
t('Stránka'),
);
Comments
Comment #1
antongaudis commentedsame here, any date field added to the views returns a blank page. it does works fine for nodes.
Comment #2
karens commentedThe views integration code has all been updated. Please switch to the 7.x-2.x version of Date and Calendar.
Comment #3
honza pobořil commentedI updated the module, but the result is same.
Comment #4
karens commentedI cannot replicate this problem using the 7.x-2.x code. It is not clear what 'updated the code' means. This issue is still marked as a 7.x-1.x issue, so I have no idea if you are using that.
I can add date fields to views just fine.
Comment #5
honza pobořil commentedNew informations: View doesn't show nodes imported by Feeds and nodes with blank value of date field.
Comment #6
honza pobořil commentedAnother informations: View shows nodes with active lang code, but dont show nodes with "und" lang code. "und" langcode use Feeds to import all nodes.
My site have "cs" set as default language.
Successfully listed nodes:
…
- language (String, 2 characters ) cs
…
- field_date (Array, 1 element)
-- cs (Array, 1 element)
--- 0 (Array, 4 elements)
---- value (String, 19 characters ) 2009-04-01T23:01:00
---- timezone (String, 13 characters ) Europe/Berlin
---- timezone_db (String, 3 characters ) UTC
---- date_type (String, 4 characters ) date | (Callback) date();
…
Not listed nodes:
…
- language (String, 3 characters ) und
…
- field_date (Array, 1 element)
-- und (Array, 1 element)
--- 0 (Array, 4 elements)
---- value (String, 19 characters ) 2009-02-04T00:02:00
---- timezone (String, 13 characters ) Europe/Berlin
---- timezone_db (String, 3 characters ) UTC
---- date_type (String, 4 characters ) date | (Callback) date();
…
Comment #7
honza pobořil commentedConfirmed, it don't list nodes with date field which has langcode different from site's default language.
Comment #8
acoustika commentedsame, subscribing
Comment #9
a.siebel commentedsubscribe
Comment #10
gagarine commented#1103982: Adding a Date field to Fields in View adds a Language Filter in where-clause. marked as duplicate
As explain in the other bug report, date add a where clause on language. The language ("en" here) is the one of the current user.
Comment #11
gagarine commentedit also never display node wihtout a specific language (und)
Comment #12
gagarine commented#1082404: Date field not working in Views when Locale activated marked as duplicate
Comment #13
Anonymous (not verified) commentedOk! I got some help from gagarine and found a workaround. This has to be adapted to your view, based on your filters there will be a different number of conditions in the query.
Comment #14
jdanthinne commentedBug is bothering me as well, and I've searched in the module to find where it adds this WHERE clause, but found nothing.
So I had a look to Views and found this at line 152 of views/modules/field/views_handler_field_field.inc :
It seems that it checks if field is translatable and adds the language condition… so the solution (I guess) seems to set the "translatable" setting of field to FALSE?
Comment #15
gagarine commentedGod catch jdanthinne i was able to make better search and find that this bug is a duplicate of #1057544: Date field language handling problems
Comment #16
acoustika commentedsubscribe...