Hi,
I am setting up Calendar. I've got the calendar to load, I can create events, however they will not show in the calendar. Any ideas why?

Comments

arlinsandbulte’s picture

Status: Active » Postponed (maintainer needs more info)

No, no idea why. There is not enough information here to do anything with.

Did you edit the calendar view?
See the example screencast: http://vimeo.com/6544779

jm.federico’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I'm having same problem, found a casue, will try to explain:

In the theme.inc, line 125, this happens:

    foreach ($row as $key => $value) {
      if (in_array($key, $calendar_fields)) {
        $items[$num]->calendar_fields->$key = $value;
      }
    }

WHat that does is, it checks which date fields are present for the result that is being evaluated. It does it by comparing agains the alias of the field used in the view. That breaks when the alias for the field is longer than 19 characters.

Check the query that my views run:

SELECT node.title AS node_title, node.nid AS nid, node_data_field_vencimiento_alerta.field_vencimiento_alerta_value AS node_data_field_vencimiento_alerta_field_vencimiento_alerta_, node.type AS node_type, node.vid AS node_vid FROM node node  LEFT JOIN content_type_tc_alertas node_data_field_vencimiento_alerta ON node.vid = node_data_field_vencimiento_alerta.vid WHERE (node.status = 1) AND ((DATE_FORMAT(ADDTIME(node_data_field_vencimiento_alerta.field_vencimiento_alerta_value, SEC_TO_TIME(-18000)), '%Y-%m') <= '2011-01' AND DATE_FORMAT(ADDTIME(node_data_field_vencimiento_alerta.field_vencimiento_alerta_value, SEC_TO_TIME(-18000)), '%Y-%m') >= '2011-01')) ORDER BY node_data_field_vencimiento_alerta_field_vencimiento_alerta_ ASC

The field alias is node_data_field_vencimiento_alerta_field_vencimiento_alerta_ which is compared against node_data_field_vencimiento_alerta_field_vencimiento_alerta_value, it is not the same, hence, the above code finds no fields for the given result, hence nothing is shown in the view.

I'm marking this as critical as it break functionality and is really hard to find the problem since it gives no error.

jm.federico’s picture

Category: support » bug
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

Forgot to change status.

hnln’s picture

Category: support » bug
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

same problem here (using views 3.x, probably related to http://drupal.org/node/1038486).

When I run the query generated by views I get the correct result, but calendar_build_nodes returns empty cause $item->calendar_fields is empty (as explained in issue #2).

jm.federico’s picture

Status: Active » Closed (duplicate)
Meeker’s picture

Status: Closed (duplicate) » Closed (fixed)

I have now solved the problem. Its related to languages. The event item was language neutral, but I had a filter to show only English. Thanks for everyones help.