drupal 7, views 3 rc 3
in views 3 condiguration:
filter criteria:
'Date From'
yes - expose this filter to visitors...
is equal to
date value: select a date (entered a default value)
no - remember the last action
(same settings for the 'date to' criteria)
advanced settings:
exposed form in block : Yes
use ajax:no
use aggregation: No
caching:None
however i get an error on the page:
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 64 of I:\My Documents\web\xampp\htdocs\mysite\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_parts_form() (line 316 of I:\My Documents\web\xampp\htdocs\mysite\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 64 of I:\My Documents\web\xampp\htdocs\mysite\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 64 of I:\My Documents\web\xampp\htdocs\mysite\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 64 of I:\My Documents\web\xampp\htdocs\mysite\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in views_handler_filter_date->accept_exposed_input() (line 97 of I:\My Documents\web\xampp\htdocs\mysite\sites\all\modules\views\handlers\views_handler_filter_date.inc).
I attached also how the views resulted with a small question mark in the filter field.
Click to view image
Tried looking for some patches but cannot seem to find any...
Thanks!
Comments
Comment #2
karens commentedUnable to reproduce this. There are hundreds of permutations of ways you could have constructed date fields and then set up views using those fields. Unless you can tell me how to reproduce this issue there is nothing I can do. I have dozens of fields and numerous views and none of them produce errors like this.
Comment #3
karens commentedNo response, cannot reproduce.
Comment #4
mikeker commentedApologies for reopening a closed issue, but these step reproduce the errors in the original post. Let me know if you'd prefer a new issue be created instead.
Steps to reproduce:
The latest release of Date has the errors at lines 73 and 99 instead of 64 and 97 as originally reported.
Should the option to add a Date-based field to a View even be shown before the Date Views module is enabled? It seems like that's the root problem. Note that the filter operators are the same as those allowed for a text filter before Date Views is enabled (begins with, contains, ends with, etc).
To fix the warnings: edit the Date filter, click apply, and save the view. Note that the filter operator options have changed to what we would normally expect for a date filter (greater than, less than, etc.)
Comment #5
bsztreha commentedI think i have the same problem:
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of C:\AppServ\www\pk\web\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_parts_form() (line 344 of C:\AppServ\www\pk\web\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of C:\AppServ\www\pk\web\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of C:\AppServ\www\pk\web\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of C:\AppServ\www\pk\web\sites\all\modules\date\date_views\includes\date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in views_handler_filter_date->accept_exposed_input() (line 99 of C:\AppServ\www\pk\web\sites\all\modules\views\handlers\views_handler_filter_date.inc).
Exposed one date fileld in view table list.
Comment #6
mustanggb commentedI "fixed" this by editing the filter, setting a value for "Select a date" then saving, editing the filter again, removing the "Select a date" then saving again.
So seems the issue is that the field value is not being initialised properly when it should be empty by default.
Comment #7
Screenack commentedThanks to akamustang, his fix cleared my issue as well. FWIW, I wouldn't see the error from the admin/views preview but rather on the page I created for the filtered view.
Comment #8
gabrielmachadosantos commentedakamustang thanks.. worked fine here!
Comment #9
nielsdaniel commentedthanks akamustang, this worked for me as well
Comment #10
spencerthayer commentedSame error:
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of /var/www/com/sites/all/modules/date/date_views/includes/date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_parts_form() (line 344 of /var/www/com/sites/all/modules/date/date_views/includes/date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of /var/www/com/sites/all/modules/date/date_views/includes/date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of /var/www/com/sites/all/modules/date/date_views/includes/date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in date_views_filter_handler_simple->date_default_value() (line 73 of /var/www/com/sites/all/modules/date/date_views/includes/date_views_filter_handler_simple.inc).
Notice: Uninitialized string offset: 0 in views_handler_filter_date->accept_exposed_input() (line 132 of /var/www/com/sites/all/modules/views/handlers/views_handler_filter_date.inc).
Though a "fix" seems to exist the module should be corrected to take this into account.
Comment #10.0
spencerthayer commentedadded picture
Comment #11
hernanderivera commentedAl momento de configurar el filtro, lo resolví seleccionando el operador "contiene"¬"Seleccionar una fecha"
Comment #12
opgobee commentedProblem still existing. 'Fix' of GBMustang worked for me. Thanks.
Comment #13
ovidenov commented#6 worked for me