I've got a simple View that returns all nodes of a certain CCK type as an iCal feed but the URL always returns an HTTP 500 file not found. Below is my view. Any ideas?

 $view = new stdClass();
  $view->name = 'public_ical';
  $view->description = '';
  $view->access = array (
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Upcoming Events at Shady Grove';
  $view->page_header = '';
  $view->page_header_format = '3';
  $view->page_footer = '';
  $view->page_footer_format = '3';
  $view->page_empty = 'No upcoming events';
  $view->page_empty_format = '3';
  $view->page_type = 'calendar_ical';
  $view->url = 'pub_ical';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '999';
  $view->sort = array (
  );
  $view->argument = array (
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
    array (
      'tablename' => 'node_data_field_time_and_date',
      'field' => 'field_time_and_date_value',
      'label' => '',
      'handler' => 'content_views_field_handler_ungroup',
      'defaultsort' => 'ASC',
      'options' => 'default',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'public_event',
  1 => 'seminar',
),
    ),
    array (
      'tablename' => 'node_data_field_time_and_date',
      'field' => 'field_time_and_date_value_default',
      'operator' => '>',
      'options' => 'now',
      'value' => '',
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node, node_data_field_time_and_date);
  $views[$view->name] = $view;

Comments

KarenS’s picture

Status: Active » Postponed (maintainer needs more info)

That is not a calendar view, I'm not even sure how you would be getting an ical feed into it. I don't see anything here that would use the Calendar ical module or import or export an ical feed.

KarenS’s picture

Oh I see what you did, you just created a regular view and set the view type to be 'ical feed'. That's not the way the ical feed works. It shows up as an option in the View type because there's no way for me to keep it out of there, but the right way to create an ical feed is to start with the default calendar view and add an ical argument to it. That's explained in the Calendar instructions (http://drupal.org/node/120710).

I guess I have to add a validation error to warn you that this won't work.

dugh’s picture

I have the latest 5.2 dev version and found 2 ical problems. One is that if I add both an rss and ical argument to the calendar view, the ical feed gives the same error as this person, it basically isn't there.
If I delete the rss feed argument (which is fine), the ical is there, but importing it into sunbird, I get an error that the timezone is invalid or something. I do still have the event module installed if that's the problem, although the calendar view uses a completely separate content type with no event fields at all, only a date field (also using latest 5.2 dev version).

presleyd’s picture

But won't I have to specify a year and month argument? How do I get an ical feed of all the events in that view and not have to limit it to a certain subset of months or years?

presleyd’s picture

I made sure wildcards were defined in the arguments as 'all' and tried to get a feed with this URL:

https://carb.umbi.umd.edu/syndication/public_events/all/all/all/ical but the iCal file that came out had no events in it.

If I ask for a specific month (https://carb.umbi.umd.edu/syndication/public_events/2008/07/all/ical) the resulting iCal file includes the proper events.

How do I get a URL that someone can just dump into their Google Calendar or Mozilla Lightning or whatever that won't change? I don't want them to have to put in a new URL every month. I'd like the date range to be defined by the View not by the URL. Is this possible currently?

KarenS’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

This issue has turned into a whole bunch of unrelated and completely separate issues, which makes it nearly impossible to do anything with. The original issue was trying to put an ical feed on a non-calendar page, which you can't do, so that one is by design but probably could use a validation warning.

Then we have an issue about placing an ical feed and an rss feed on the same view, which probably won't work in the current code and I don't know any way to make it work. You can do things like that in Views 2 but not easily (or at all) in Views 1. I guess that makes it by design.

Then there is an issue about a timezone error when you have the Event module installed. You can't use Date and Event together right now or the Date API has no way of getting the right timezone information, so you will get lots of timezone errors and I can't do anything about them. So that is probably by design, too.

Then we have a question about creating an ical path that will always point to the current date instead of a fixed date, and that one would be by design now but could be a feature request.

So if any of these need more work, open *separate* issues for them please.