Closed (fixed)
Project:
Date
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2011 at 14:37 UTC
Updated:
12 Apr 2011 at 21:51 UTC
Jump to comment: Most recent file
Views changed the way it defines Field data which broke the way it was implemented here. Views has changed quite a bit from the way it worked when I originally wrote the Date Views integration and I have been trying to just keep it as functional as possible while Views was still changing. I think the Views code is now pretty settled down and I probably need to completely rewrite the Date Views integration to work better with the way that Views now works.
I posted some commits to get around some errors, but it is basically pretty broken now and will be until I get a rewrite done.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | working_view.jpg | 97.3 KB | switch |
| #13 | broken_view.jpg | 99.69 KB | switch |
Comments
Comment #1
rosborn commentedThanks for the warning. I was about to start updating my website, which has been functional since just before Drupal 7 was officially released. Do you know when the incompatibility with the Date module first set in? Would it be safe to upgrade to Views-7.x-3.0-alpha1 from Jan 5 and Date 7.x-1.0-alpha1?
Comment #2
meigwil commentedThanks for this.
I posted an issue about this on Views, and I was about to move it here when I read this.
Instead of creating a new issue, I'll x-post here. It may help you with your rewrite:
=================
Posted on http://drupal.org/node/1063936
=================
I have a content type with a title, datetime (Date module) and body field.
When creating a a calendar-like view, nothing is displayed if I choose the datetime field as a content type. I filtered on the node type, and ordered by the datetime field ASC. If I removed the datetime field from the Fields, it would show the content type (with the ORDER BY and filter in place).
Here is the SQL generated without the datetime field:
Here's the SQL generated after adding the datetime field:
I'm very new to Drupal so I hope this is enough information. Please ask if you need anything else.
I'm using the 7.x-1.0-alpha2 version of Date.
=================
Comment #3
aanjaneyam commentedsubscribing.
Comment #4
eugen80 commentedsubscribing
Comment #5
geve commentedPossibly related to this.
gives the following errors
Comment #6
joostvdl commentedsubscribe
Comment #7
sylvain lecoy commentedsubscribing
Comment #8
kruser commentedI think this is related to my issue "Error using a cck date as an argument" http://drupal.org/node/1068698
Comment #9
maritimefist commentedsubscribe
Comment #10
Renegadez commentedSub in
Comment #11
dg0yt commentedsubscribe
Comment #12
karens commentedI think the best solution is to rewrite the Views handling from the ground up. I have opened a new branch (7.x-2.x) and started work there to do this. See #1075896: Re-work Views arguments and #1075890: Re-work Views filters.
Views has changed significantly over the course of the time since these were first written, they really need a fresh look anyway.
When that seems solid, that branch will become the recommended release.
Comment #13
switch commentedIf you don't mind I post here my example of View broken with Date field used in Fields. If you don't like it here feel free to delete this post. So I post it just in case you need more info about broken Views. Hope it's clear just by looking at the attached pics.
Comment #14
sebish commentedSubscribe
Comment #15
hansfn commentedSubscribe.
PS! Regarding the "Unknown column 'field_data_field_date.field_date'" error. I get it too - the correct column name is field_data_field_date.field_date_value. I guess this will be fixed by the re-write.
Comment #16
vqmalic commentedSubscribing
Same problem here where "_value" is missing from the sql statement
Comment #17
aanjaneyam commented@KarenS. Does this means that we are unable to use date in views at all till the initial dev version of rewrite is complete. I am having a development installation where I need date views integration to accomplish my required views and calendar views. Should i start using date-7.x-2.x dated 28 February 2011. Even otherwise for future compatibility should we use 7.x-2.x for date uses other than views.
Comment #18
kirkcaraway commentedsubscribing
Comment #19
eugen80 commentedany temporary solution for this error?
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_field_event_date.field_event_date' in 'where clause': SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {node} node LEFT JOIN {field_data_field_event_date} field_data_field_event_date ON node.nid = field_data_field_event_date.entity_id AND (field_data_field_event_date.entity_type = :views_join_condition_0 AND field_data_field_event_date.deleted = :views_join_condition_1) WHERE (( (1=1) AND (field_data_field_event_date.language = :db_condition_placeholder_0) )AND( (DATE_FORMAT(ADDTIME(field_data_field_event_date.field_event_date, SEC_TO_TIME(3600)), '%Y-%m-%d') >= '2011-03-06') ))) subquery; Array ( [:db_condition_placeholder_0] => en [:views_join_condition_0] => node [:views_join_condition_1] => 0 ) in views_plugin_pager->execute_count_query() (line 140 of /var/www/vhosts/example.com/subdomains/dev/httpdocs/sites/all/modules/views/plugins/views_plugin_pager.inc).
Comment #20
draganerorSubscribe
Comment #21
David D commentedSubscribe
Comment #22
meigwil commentedI've looked through Views' and Date's source but I can't see where they integrate with each other.
I'm experienced with PHP and want to contribute, so can anyone point me in the right direction? The problem that I have is using date as a field in a View.
Comment #23
WilliamV commentedWhen does dev-team can priovide a views-compatible module?
Grtz.
Comment #24
hieronymousch commentedsubscribe
Comment #25
highfellow commentedsubscribe.
Comment #26
TapioK commentedsubscribe.
Comment #27
bradjones1Subscribe
Comment #28
karens commentedThe new views handling is in the 7.x-2.x branch of Date. The Calendar module has not been completely updated to the new code yet.
Comment #29
basicmagic.net commentedsubscribe
Comment #30
jamesnumiko commentedsubscribe
Comment #31
karens commentedUmm, you guys are subscribing to a closed issue. Nothing more will happen here.
Comment #32
bryancasler commentedI upgraded to the latest views and date modules today, still getting a slew of line 252 errors.
Related conversation was happening here #1064134: Undefined index and array_merge errors when using latest views
Comment #33
karens commentedThis is a closed issue. And if you are getting errors on line 252 there is something wrong with your installation. There is nothing like that on line 252 any more. Empty your date folder and get a fresh copy of everything.
Comment #34
bryancasler commentedI uninstalled the alpha 2 module and installed the current dev. No problems so far, will report back if they crop up.
Comment #35
zabelc commented@KarenS, any chance we could get an alpha3 cut & recommended sometime?
Like animelion, I just got this issue because the auto-update task recommended I "upgrade" from dev to alpha2. I'm pretty sure this sort of thing happened to me a at least once before with this module as well...