Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
According to #670344: Make CCK compatible with both, views 2 and views 3 some updates are necessary for date to work with Views 3. Using date 2.4, it looks like some changes are needed. The changes should be compatible with Views 2.
Several modules like Content Profile, Date, Link, Flag are still using views_handler::options(&$options) {} to define options for this fields/filters/arguments.
This is not supported any more by views 3. We should use option_definition() ...
Comment | File | Size | Author |
---|---|---|---|
#15 | date_theme_date_all_day.patch | 1.06 KB | jcmarco |
#7 | date-views-php5.3-fix.patch | 4.7 KB | perusio |
#5 | date-views3a2-698522-5.patch | 4.78 KB | tauno |
#4 | date-views-3.patch | 1.33 KB | dagmar |
#3 | date-views3a2-698522-3.patch | 4.4 KB | tauno |
Comments
Comment #1
rjbrown99 CreditAttribution: rjbrown99 commentedIn date_api_argument_handler.inc, change this:
to this:
Also, in date_api_filter_handler.inc, remove this:
and change the options_definition to this:
Last but not least, date_plugin_display_attachment.inc needs to be changed. This is the code block that needs updating, but I'm not sure as to how to do this one given the arguments being passed around.
Comment #2
Ahqar CreditAttribution: Ahqar commented@ rjbrown99
Changing the last bit to the following did the trick for me.
Comment #3
tauno CreditAttribution: tauno commentedPatch based on #1 and an attempt at updating date_plugin_display_attachment.inc based on the views display plugin. The attachment display has not been tested yet.
Comment #4
dagmarIt seems that this is not correctly converted. Please take a look to the attached patch. Views uses 'contains' for complex arrays.
My patch doesn't include the conversion for date_plugin_display_attachment so, if you can take care of merge both patches, I will appreciate. Thanks!
Comment #5
tauno CreditAttribution: tauno commentedIncorporating changes from #4.
Comment #6
AdrianB CreditAttribution: AdrianB commentedSubscribing.
Comment #7
perusio CreditAttribution: perusio commentedThanks for the patch it fixes the issues, although there are two spurious '\ No newline at end of file' lines in the patch. Here's a new one with the said lines removed.
Comment #8
KarenS CreditAttribution: KarenS commentedFinally got to this. I ended up applying it by hand but I believe it is correct. Please let me know if it is not.
Thanks everyone!.
Comment #9
tim.plunkettAccording to the commit log, this also made changes in date/date.module that now try to call theme_date_all_day() by passing an array instead of 6 variables, but date/date.theme still expects 6 variables.
diff of date.module
Missing argument 3 for theme_date_all_day() in /sites/all/modules/date/date/date.theme on line 248
Comment #10
KarenS CreditAttribution: KarenS commentedCrap, I committed some D7 changes to D6. I'll fix it.
Comment #11
choster CreditAttribution: choster commentedThanks, hopefully that will also clear up #733986: Missing argument x for theme_date_all_day().
Comment #12
tim.plunkettmarked as active as a reminder
Comment #13
Dig1 CreditAttribution: Dig1 commentedYep, I am running Drupal 6.16 and I just upgraded the Date module to 2010-Mar-06 and got:
Missing argument x for theme_date_all_day()
in multiple lines all over the front page.
So I re-used 2009-Nov-11 and the problem goes away.
Cheers
Comment #14
H3x CreditAttribution: H3x commented+1
Comment #15
jcmarco CreditAttribution: jcmarco commentedIn the function date_formatter_process($element), the theme function is called with D7 format, using arrays to pass arguments.
If you don't want to break API compatibility then the theme and arguments should be the same, in other case the theme function
should be declared using an arrays as argument. There is even a new argument not declared in the theme function.
But I guess that the real problem is using the D7 theme() format.
Comment #16
anawillem CreditAttribution: anawillem commentedi applied the above patches, and now the list of errors only happens when I am actually looking at a calendar view (it was happening on every page). any ideas?
Comment #17
anawillem CreditAttribution: anawillem commentedsubscribing
Comment #18
KarenS CreditAttribution: KarenS commentedFixed, sorry about that!
Comment #20
timlie CreditAttribution: timlie commentedWhat about the new "group filters" of views 3 (AND - OR)?
With date you can specify if date filters use AND ; OR.
As views 3 has this ability of his own it can be removed. As far as I have tested it now it doesn't even work anymore in conjunction with group filters in views 3.
Comment #21
kevinob11 CreditAttribution: kevinob11 commentedAny idea of the issue mentioned in #20 is going to be resolved? I've run into this as well, as date creates its own group and messes up the grouping that is now built into views.
Comment #22
emosbaugh CreditAttribution: emosbaugh commentedsubscribing
Comment #23
macdonaldj CreditAttribution: macdonaldj commentednot sure if this issue is related, but with views 3 and filtering by date with all filters in the same group, it uses an OR instead of an AND with the date:
the where clause:
WHERE ((node.status = 1) AND (node.type in ('events')) AND ((node_data_field_tap_talk.field_tap_talk_value) = ('1'))) OR (DATE_FORMAT(node_data_field_date.field_date_value, '%Y-%m-%d') >= '2011-10-12')
I would expect the statement to be:
WHERE ((node.status = 1) AND (node.type in ('events')) AND ((node_data_field_tap_talk.field_tap_talk_value) = ('1')) AND (DATE_FORMAT(node_data_field_date.field_date_value, '%Y-%m-%d') >= '2011-10-12'))
Comment #24
kevinob11 CreditAttribution: kevinob11 commentedI think it is related. It appears that date is using its own built in grouping instead of using the grouping built into views 3. I've built a small module that moves them back into the appropriate group, however its pretty hacky since it uses a ton of nested if statements in order to account for all (probably only most) permutations of date where clauses. I haven't had time to dig into date and see if I can write a patch, I will try to find some time in the next few weeks.
@macdonaldj if all of your other stuff is in a single group you might be able to fix your issue by just switching the date specific functionality to "and" instead of "or", its at the bottom of the page when you add a date filter.
Comment #25
idflood CreditAttribution: idflood commentedHere is an issue related to what is described in #23 I think: #735170: Date filter incorrectly grouped in Views 3 filter
Comment #26
DamienMcKennaUnfortunately the D6 version of this module is no longer supported, but we appreciate the time you put into this.