Drupal 7 is out and views got an alpha version, do you need help porting the module ? What are the bugs to fix to have an alpha release ? (-dev is not working for now).

Comments

KarenS’s picture

Status: Active » Fixed

Dev is working fine. I just had to re-organize the Date module to work around a core bug in the auto uploader and couldn't do a release until that was done. I'm taking one more spin through the issue queue to see if there is anything else I need to get in.

Sylvain Lecoy’s picture

I can't manage to get a calendar - even the default one - working, let me try reinstalling from scratch with the dev version and I get back to you.

monjohn’s picture

I echo this. I get the Upcoming Events list, but can't get any nodes to show on a month view.

Sylvain Lecoy’s picture

Well, after tests I have concluded the following:

- Calendar is working with the default "updated" date value from node
- The Upcoming Events list is working with custom field_date of type Date.
- Month and default view doesn't work with those fields for some strange reason.

The sql request outputed by views is:

SELECT node.title AS node_title, node.nid AS nid, node.type AS node_type, 'node' AS field_data_field_date_node_entity_type
FROM 
{node} node
LEFT JOIN {field_data_field_date} field_data_field_date ON node.nid = field_data_field_date.entity_id AND (field_data_field_date.entity_type = :views_join_condition_0 AND field_data_field_date.deleted = :views_join_condition_1)
WHERE (( (node.status = '1') AND (node.type IN  ('date')) )AND( ((DATE_FORMAT(ADDTIME(STR_TO_DATE(field_data_field_date.field_date_value, '%Y-%m-%dT%T'), SEC_TO_TIME(3600)), '%Y-%m') <= '2011-01' AND DATE_FORMAT(ADDTIME(STR_TO_DATE(field_data_field_date.field_date_value, '%Y-%m-%dT%T'), SEC_TO_TIME(3600)), '%Y-%m') >= '2011-01')) ))

Which execute correctly on mysql replacing the following: {node} by your node table, {field_data_field_date} by your field date table, :views_join_condition_0 by 'node', and :views_join_condition_1 by 0.

rublev_green’s picture

same with me: when changing default "updated" date to my "field_event_date_start value" calendar view is empty.

Here is my SQL:

SELECT node.title AS node_title, node.nid AS nid, node.type AS node_type, 'node' AS field_data_field_event_date_start_node_entity_type
FROM 
{node} node
LEFT JOIN {field_data_field_event_date_start} field_data_field_event_date_start ON node.nid = field_data_field_event_date_start.entity_id AND (field_data_field_event_date_start.entity_type = :views_join_condition_0 AND field_data_field_event_date_start.deleted = :views_join_condition_1)
WHERE (( (node.status = '1') AND (node.type IN  ('events')) )AND( ((DATE_FORMAT(ADDTIME(STR_TO_DATE(field_data_field_event_date_start.field_event_date_start_value, '%Y-%m-%dT%T'), SEC_TO_TIME(-28800)), '%Y-%m') <= '2011-01' AND DATE_FORMAT(ADDTIME(STR_TO_DATE(field_data_field_event_date_start.field_event_date_start_value2, '%Y-%m-%dT%T'), SEC_TO_TIME(-28800)), '%Y-%m') >= '2011-01')) ))

Any work around out there?

monjohn’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha1
Category: task » bug
Priority: Normal » Major
Status: Fixed » Needs work

Changing to a bug report rather than starting a new issue, since the description of the problem is laid out above.

KarenS’s picture

Status: Needs work » Fixed

Views made lots of changes to field handling just before the new release, which broke lots of things here. I issued a new release with some work-arounds to get things working again and am waiting until the dust settles on how the new core fields will be handled in Views before doing much more with the Views integration. These changes should get things working with latest Views release.

monjohn’s picture

Thanks, Karen. Not that you do it for the thanks, but thanks for all your hard work!

Sylvain Lecoy’s picture

By lastest Views release you mean the alpha ? Or the latest code (e.g. dev version from 20th January 2011)

KarenS’s picture

The Views alpha added a ton of changes to field handling on the day it was released, and more changes are going in every day.

I tried to create a Calendar and Date release that would work with the Views alpha release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Sylvain Lecoy’s picture

Status: Closed (fixed) » Active

I am sorry but i still have issues displaying a proper calendar with fields.

If the example provided by the module (e.g. default view) is workig, adding other fields leads to a display bug. I see some fancy stuff such as ="02.11.2011">tickets or other broken fields. Is that a view related problem or calendar related ?

Sylvain Lecoy’s picture

This is for instance an output for an event:

Party #34
10 € 2 consos en prévente
15 € 1 conso sur place
.field_date.0.0 calendar monthview">

Sylvain Lecoy’s picture

This is caused by the node->date_id being incorrectly filled:

node->date_id =

calendar.<div class="field field-name-field-longtext field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Soirée du 22<br />
15 € 1 conso<br />
dès 22h</p>
</div></div></div>.field_date.0.2

This being outputted here in calendar-month-node.tpl.php:

<?php
<div class="view-item view-item-<?php print $view->name ?>">
  <div class="<?php print $node->date_id; ?> calendar monthview">
    <?php print theme('calendar_stripe_stripe', array('node' => $node)); ?>
    <?php foreach ($fields as $field): ?>
      <div class="view-field view-data-<?php print $field['id']; ?> <?php print $field['id']; ?>">
        <?php if ($field['label']): ?>
          <div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
        <?php endif; ?>  
        <?php print $field['data']; ?>
      </div>  
    <?php endforeach; ?>
  </div>    
</div>
?>

It then break the rendering with the unexpected double quote. Hope it helps.

date_id is constructed line.854 of calendar.module.

$node->date_id = $id . '.' . $pos;

$id is constructed line.663

$id = 'calendar.' . $item->id . '.' . $real_field . '.' . $delta; and $item-id is faulty, it contains all fields constructed.

outputting $item-> id = <div class="field field-name-field-longtext field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even"><p>Soirée du 22<br />15 € 1 conso<br />dès 22h</p></div></div></div> instead of a valid id.

Sylvain Lecoy’s picture

Any news on this issue ?

KarenS’s picture

Status: Active » Fixed

Which issue? The original issue (please make an alpha release) or the totally unrelated issue that was re-opened (some things are still broken)?

The original issue is fixed. Do not turn this into an issue about anything you may find wrong with Calendar.

And if you look on the Date issue queue you will see that Views has changed and it broke lots of views, and I have to rewrite the integration.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.