It would be great to use this module with the Search API and Apache Solr based facet powered views.

Currently though, date fields in search_api solr based views don't appear to be supported.

I spent a couple of hours investigating tonight. Here's what I know so far:

date_ical_plugin_row_ical_entity.inc uses date_views_fields() which doesn't recognize date fields from search_api solr based views.

Also, I'm seeing a "Fatal error: Call to undefined method SearchApiViewsQuery::add_field()". Haven't figured out why yet; may be related to previous issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

coredumperror’s picture

Do you know which API call should be used to get those Solr-based date fields? I'd be happy to add support for this, but I've never used Solr, so I'm not sure how.

coredumperror’s picture

Status: Active » Fixed

I think this kind of integration may now be possible, with the new iCal Fields plugin. It lets you use Views Fields to populate your iCal feeds, instead of pulling the data directly off the entities themselves. Date iCal v2.9 (which will be released shortly after I post this), and the latest dev version, have the iCal Fields plugin.

Status: Fixed » Closed (fixed)

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

guillaumev’s picture

Version: 7.x-2.8 » 7.x-3.1
Component: Code » iCal Import
Issue summary: View changes
Status: Closed (fixed) » Active

Reopening this as I'm trying to get a date ical feed out of a Search API view and it's not working. The issue, I believe, comes from the fact that search API returns views rows in the following format:

stdClass::__set_state(array(
   'entity' => 7408,
   '_entity_properties' => 
  array (
    'search_api_relevance' => 1,
    'search_api_excerpt' => '',
    'search_api_id' => '7408',
  ),
   'index' => 0,
))

Therefore not returning rows as Date ICal expects them...

coredumperror’s picture

Yeah, that would definitely not be something that Date iCal expects. I guess Search API must hook into the Views system later in the process, to convert that data to an actual node.

I'm on a super tight deadline at work right now, though, so I haven't currently got any time to put toward Date iCal at the moment. I'll try to look into this next week.

aaron.hirtenstein’s picture

Has there been any movement on this, I have come up against this issue and it would be great if a solution could be found

coredumperror’s picture

I'm afraid not. My company is moving away from Drupal, so I'm not going to have much time available for debugging module interoperability issues. I'm going to try to stay on top of major bugfixes with Date iCal itself, but I can't guarantee anything more than that.

gmclelland’s picture

@coredumperror - Sorry to hear that. What is the alternative CMS/stack that your company is moving too?

coredumperror’s picture

We're moving to Wagtail, which is a Python CMS based on the Django framework. Unlike Drupal, which is designed to enable non-technical admins to create a site, Wagtail is designed to enable programmers to create a site. This lets Wagtail get around some of the (let's face it) totally insane drawbacks of Drupal, e.g. separate tables for each individual field. Drupal has to do it that way to make it possible to edit the site's content types and views from the UI. But since Wagtail doesn't let you do that, the site designers are able to code content types in a way that actually makes sense. And Django's template system is lightyears ahead of Drupal's, in my opinion.

gmclelland’s picture

Good to know. Thanks for the explanation. I'll check it out.

coredumperror’s picture

Status: Active » Postponed

Marking this as postponed, since Date iCal is in maintenance-only mode until someone volunteers to be (co-)maintainer.

geek-merlin’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Status: Postponed » Active

Setting active, i'll be giving some work into it the next time.

Paul Lomax’s picture

Here is a first attempt at a patch. The one caveat is the 'first_available' function doesn't work. You have to manually select the date field in the view. This also doesn't work with the entity view.

Hope this helps someone!

geek-merlin’s picture

Status: Active » Needs work

Hi paul, this is a great start!
After using -p7 patch applied (patches should be relative to module dir, not project root).
Unfortunately it does not work for single-valued fields currently.

geek-merlin’s picture

Status: Needs work » Needs review
FileSize
2.21 KB

Patch flying in that works for single-valued fields too.

joseph.olstad’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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