Is anyone working on or are there any plans for an iCal parser for Feeds for Drupal 7? It's pretty much a showstopper for me personally from using D7 for my next project.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ekes’s picture

Project: Feeds » iCal feed parser
Version: 7.x-2.x-dev » 6.x-2.0-beta1

The iCal feed parser will be but upgrade soon... But note it's very closely tied to the date module as well which is still being ported. The rest of the parser doesn't need much change.

A Romka’s picture

any news on that??

ekes’s picture

It's in HEAD if you want to experiment. But repeating events in date seem broken the last time I was working on it.

kirkcaraway’s picture

subscribing

endiku’s picture

subscribing

SandraL’s picture

Subscribe

perandre’s picture

Sub!

CheezItMan’s picture

Subscribing

timbrandin’s picture

subscribe

timbrandin’s picture

I've created a new project with Aggregator, it's in sandbox right now and it makes it possible to list upcoming events in blocks or views through Aggregator simply by converting iCal to RSS.

You can help improve it or help along getting it in full project mode by reviewing it through here:
http://drupal.org/node/1207208

It's not a extension to Feeds though, if that's what your looking for, but its a solution to the problem

Hope it helps someone.

Gluhm’s picture

Is there any progress? I would like to help if I can e.g. testing the ical parser module.

liberatr’s picture

http://drupalcode.org/project/parser_ical.git/tree/refs/heads/master

I get the following notice trying to import something from Google Calendar:

Notice: Undefined index: LOCATION in _parser_ical_parse() (line 68 of /sites/all/modules/parser_ical/parser_ical.dateapi.inc).

Renee S’s picture

I can confirm the location bug.

Wim Leers’s picture

Subscribing.

wftl’s picture

I've installed the code from Git for use with Drupal 7. Seems to install and integrate well. I created a feed but when I go to the node, select the Import tab, and click Import Now, I get the following error.

An error has occurred.
Please continue to the error page

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=35&op=do StatusText: Internal Server Error ResponseText:

Clicking the link on "error page" takes me back to the node I created to import the feed.

Ideas? Suggestions?

--
Marcel Gagne
Writer and Free Thinker at Large

Andrew_Mallis’s picture

subscribe,

chrissncco’s picture

subscribe

ekes’s picture

Version: 6.x-2.0-beta1 » 7.x-2.x-dev
Assigned: Unassigned » ekes
Priority: Normal » Critical

Update.

I've moved this up my priority list (hence status too). The (now) 7.x-1.x branch which was just a port of the old 6.x-2.x feeds code is dead-ended. The api's have been changing, and so it makes lots of sense to do:-

The new version (7.x-2.x) branch is a re-write to support both the date module ical parser code, but also iCalcreator which is a much more comprehensive parser. The former will be fine for most people, the later should work better for those growing number of cases where something else was needed.

As of this moment the first code has been committed into the branch. It's really really really in flux, so liable for radical change. Tests passing so far are for date and basic text. With date there are timezone issues, as ever, with the feeds date mapper - I have some patches for that, that pass all the tests so far. There are still issues over granularity (all day events), how that is solved (and I think it can be) depends on which way date goes (it's still in development and discussion in the issue queues).

Roadmap is: repeating events next; patches for mapping proposed; other field support; other component support (iCalcreator and the module might already be working for VTODO and VJOURNAL actually, but it's not in the tests yet).

Additional code welcome just contact me so we can co-ordinate. The easiest is probably writing additional tests, and source field support (with test naturally :)

xlyz’s picture

subscribing

ajmartin’s picture

subscribing

bjlewis2’s picture

Subscribing

jspayne’s picture

Subscribing

georgedamonkey’s picture

subscribe

bjlewis2’s picture

@georgedamonkey Stop subscribing and start following. (Use the new follow button instead of writing "subscribe".)

georgedamonkey’s picture

Oh, excellent. Glad to see they added that. Thanks for letting me know!

hampshire’s picture

Are there supposed to be more source fields than Summary, Description, Date start and Date end in the 7.x-2 version of this module. The options are quite a bit different than what I have in the 6.x version and just wanted to make sure this was supposed to be the case and not because I have done something wrong.

Thanks.

kriskhaira’s picture

FileSize
84.09 KB

Hi. What do I use as a unique target? I don't see any source field I can use for this. I'm attaching a screenshot to help explain better.

This might be related to hampshire's question.

kriskhaira’s picture

Can't seem to import nodes using both Date API iCal parser and iCalCreator parser. This is my feed URL:
http://ibew177.org/civicrm/event/ical

kriskhaira’s picture

False alarm. Forgot to attach the import to a content type.

kriskhaira’s picture

My feed items import fine, but everytime the import happens, I get duplicate items.

Could you take a look at this patch and see what my code is missing? I added URL and GUID under the $sources array and set them up as unique targets (screenshot) but duplicate items still import. What did I do wrong?

kriskhaira’s picture

Fixed it! Had to change GUID to UID, which is used in iCal feeds. Correct patch attached.

(Thanks to ekes for being very helpful on IRC)

ekes’s picture

Thanks. I've added tests and committed this.

Justin Burns’s picture

Ekes - Any update on the status of this module? I'm not just trying to nag you - I'm a dev, and looking to contribute some effort porting/stabilizing one or more of the modules we're using on our site (http://olymega.org). I've written parsers for the iCal format at my day job, and done some trivial D7 porting, so I thought this might be a good fit. I'm curious what issues are standing in the way of a "recommended" D7 version, in your opinion. Thanks! You're welcome to get ahold of me directly: justinb(at)$oursite

ekes’s picture

justinb26 cool if you can help.

The iCalcreator based parser is actually working quite well, and importing everything that the D6 version is... but for the various complications over the actual date import, primarily timezones, or timesettings for the fields it is mapping to. There are notes about what is working, and not, in the test files.

The date module in D7 has now stabilized on what is a developed version of the date class that was developed for D6 feeds (and is still in the D7 feeds module - it's not developed further in feeds, just in the date module). It's this direction to look in to map the dates correctly I believe.

mgifford’s picture

@ekes what needs to happen to get this to a D7 dev release? Also, hoping someone runs this through Coder. It's a great time to ensure the code is up to standards.

aglobalwander_’s picture

Component: Code » Miscellaneous
Assigned: ekes » Unassigned
Category: feature » task
Priority: Critical » Minor

Note: I changed the issue task thinking it was just for the reply and don't know how to change it back. Sorry about that.

I was trying to get the Ical parser to work and was also getting the HTTP error. I really wanted to use this feature and was trying to think of a work around. I am posting this quick solution as it met my needs and maybe somebody can get some use out of it. Using a current Drupal 6 install I imported the ICal feed and then created an View with CSV export. I am importing this feed into my Drupal 7 using the node processor. I know it is not an elegant solution but thought I might share just in case somebody was trying to get Ical feeds into D7. Hope it is o.k. to post this temporary solution here.

Les Lim’s picture

Component: Miscellaneous » Code
Category: task » feature
Priority: Minor » Critical

Reverting issue status.

ehowland’s picture

I am trying, unfortunately not yet successfully, to get the 7.x branch working.

Here is what I have done so far. I am thinking of this as an outline for documentation.

Got the drupal 7 head for parse_ical from the git repository commit cbc5d99d9
Put the iCalcreator library 2.12 (http://kigkonsult.se/iCalcreator/#.T6nM_7_L4y4) in sites/all/libraries
Of course I have both date and feeds installed and enabled.
Got the feeds patch for using unique IDs (Is it necessary?)
http://drupal.org/node/661606#comment-5921904
Got the feeds patch for unsupported operand types
http://drupal.org/node/1213472#comment-5806320
Create a node type meeting with dates
Create a feed:

  • Attach to content type meeting in Basic Settings
  • select, at various times Date parser and iCalCreator parser
  • set content type to meeting in node processor make
  • I am a little unclear about replacing nodes, eventually I will need to update but have tried both update and replace.
  • set the uid to guid in mapping and mark it as an Unique Target (my content type did not have a guid field - although I also tried creating one, with no improvement) perhaps guid is added by parse_ical since I cannot delete that field.

Now I go to example.com/import and bring up the import which brings up a meeting node edit screen with the feed address at the top.
Then add the feed address for a Google calendar to the top of the node, set some other node defaults (like a taxonomy term on what I hope will be set on the new nodes for the import).

After saving the node I then get:

  • "Meeting import with icalcreator" I used as the name of the new node.
  • Updated 215 nodes (a drupal_set_message message - This is the correct number of items).

If I go to the new node
The Import tab status says:

  • Last import: 1 min ago.
  • 1 imported items total.

Go to import tab status is

  • Last import: 3 min ago.
  • 1 imported items total.

If I then use the import button on that page, I get a drupal_set_message

  • No new nodes. or Updated 215 nodes. Depending on if I set the "Update existing nodes" radio buttons to respectively: Do not update existing nodes or Replace existing nodes

But under log I see:

  • 2012-05-08 21:41:01 2012-05-08 21:40:43 Updated 215 nodes. info
  • 2012-05-08 21:41:01 2012-05-08 21:40:43 Imported in 15 s info
  • 2012-05-08 19:54:40 2012-05-08 19:54:24 Updated 215 nodes. info
  • 2012-05-08 19:54:40 2012-05-08 19:54:24 Imported in 15 s info

And under Delete Items I see

  • Last import: 6 min ago.
  • 1 imported items total.

Before I maped uid to guid I saw one node created. I figured that it was failing on the Unique Target. When I deleted it, it did not reappear.

My questions are:

  1. Is it right that the CCK type meeting be in both the Basic Settings and in the processor settings.
  2. Is GUID being added to my type by parser_ical, is mapping UID to GUID the right idea.
  3. Am I sticking the google cal feed in the right place (in the meeting node). I notice that my pre-exsisting meeting nodes now have a manditory URL is that supposed to really be an UID? Or does this work somehow that I never get new meeting nodes from the imported data?
  4. If I am not getting new nodes what do I have to do to get them to show up in my calendar views?

Thanks for any help you can provide.

jasonawant’s picture

@scottosan45,

Clever work around you've created! Could you list the fields you used in the view export? How are you able to export parts of repeating date field?

Or, if it's more convenient, could you attach a file containing your exported view.

Thanks, Jason.

bcobin’s picture

I'm getting:

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /sites/all/modules/parser_ical/includes/ParserIcal.inc on line 31, which is $sources = $this::$sources;.

A search for the error message suggests it has something to do with the double colon operator.

Holy canolli - is there really no working solution for iCal parsing in D7? Wow... thanks...

lsolesen’s picture

@bcobin --> you should create a new issue for this.

bcobin’s picture

Thanks for the quick response, @lsolesen - Done.

http://drupal.org/node/1619754

Would be great to get this working... thanks much!

janis_lv’s picture

subscribing

MrPeanut’s picture

@janis_lv — You can now just press the Follow button at the top of each issue.

mobcdi’s picture

For those of us not familar with git but still in need of iCal parsing in D7 here is what I did until a module is available,

Non Git way of getting iCal Parser for D7

1: Download the source as a .zip or .tar.gz from https://github.com/sdague/parser_ical/downloads
2: Extract the contents to a folder cause you need to package it as a module for D7
3: Create a new folder "sdague" to act as a container for the module
4: Copy the files (parser_ical.info,parser_ical.module) and the folders so your structure looks like the following (I included all folders and files available in the source so your list might look different if the code changes in the meantime

  • sdague/parser_ical.info
  • sdague/parser_ical.module
  • sdague/tests
  • sdague/includes

5: zip the folder sdague and install into D7 as a module
6: You also need to provide the php class libraries for icalcreator in a folder called libraries in 'sites/all/libraries/iCalcreator/iCalcreator.class.php' which are available from http://kigkonsult.se/downloads/index.php#icalcreator
7: After that all you need to do is configure feeds module to use a html feed as a source, run it through the iCal parser and create the nodes using the mappings you want.

Notes: feeds tamper doesn't appear to work for icalparser created nodes so you are restricted to direct mappings of source -> destination fields but it worked for me in creating the nodes which is what I was after

robin.ingelbrecht’s picture

#45 worked for me but when i18n is enabled I get the following error:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'A more complete description calendar component than that provided by the \"sum' at line 1: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.source = :source_name, :source_description, :source_parser_ical_handler AND s.context = :context AND s.textgroup = 'default'; Array ( [:language] => nl [:context] => [:source_name] => Description [:source_description] => A more complete description calendar component than that provided by the "summary" property. [:source_parser_ical_handler] => formatText ) in locale() (regel 684 van /modules/locale/locale.module).

This can be solved by changing line 34 in file includes/ParserIcal.inc to:

$value[$key] = t($value[$key]);
gittosj’s picture

#45 worked for me too - can import perfectly although some care needed setting up the mappings - remember you must have a 'unique' mapping uid-->guid works well and I had to add a location field onto my event content-type.

Hitting just one small bug which is that I've ticked 'periodic update' under the feed importer settings and cron / drush is now bailing out with the error: Error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /sites/all/modules/sdague/includes/ParserIcal.inc, line 31 which I believe is down to a php syntax issue on class / instances - see here:

http://stackoverflow.com/questions/4995540/unexpected-t-paamayim-nekudot...

Although I'm running php 5.3.3 so confused - my php skills not advanced enough to offer a patch - anyone any idea?

lsolesen’s picture

Issue tags: -xml, -ical, -parsing, -Feeds

@gittosj look at #1619754: Unsupported operand types in /sites/all/modules/parser_ical/includes/ParserIcal.inc on line 38

@ekes any chance of moving some of this code into parser_ical 7.x-1.x branch soon?

gittosj’s picture

Thanks for the pointer @Isolesen - unfortunately still borking see here: http://drupal.org/node/1619754#comment-6609606

mobcdi’s picture

As a matter of interest is anyone else having their imported content split with extra spaces between words that didn't exist in the source?

gittosj’s picture

@mobcdi - mine was working fine although having updated to drupal 7.16, I can't enable the module - parser_ical is incompatible with the Drupal version...

Anyone able to look at this?

adam3145’s picture

I have setup the iCal Parser but get this error

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=67&op=do StatusText: OK ResponseText: Fatal error: Method name must be a string in /home/vertical/public_html/sites/all/modules/parser_ical-7.x-2.x/includes/ParserIcal.inc on line 63

Thanks,

sonicthoughts’s picture

I guess this project is falling off the bandwagon for D7+ unless it is to be seriously maintained. No commits / comments in a few months. wonder if its even worth having this discussion here...

dswier’s picture

So I'm using the code from #45, and it is mostly working well. I do have one big problem with it however, and that is repeating dates. The parser seems to simply ignore the RRULEs in my ical files. Has anybody else experienced this?

coredumperror’s picture

I took the code from the 7.x-2.x branch, heavily tweaked and improved it, and incorporated it into the Date iCal module. If you want to try out my version, check out #1721678: iCal feed parser + iCalcreator-based export. If you have any bugs to report or request/suggestions to be made, please go there, since that issue is where I'll be providing support.

ekes’s picture

coredumperror: If I understand right, you've made the iCal Parser code from the 7 branch work with the new Date iCal module like it does with the iCalcreator code?

coredumperror’s picture

I've copied the code from the Parser iCal 7.x-2.x branch into Date iCal, renamed the classes and such to match, and added new functionality/bug fixes. Date iCal already supports outputting iCal feeds through Views (using iCalcreator), so I figured that it would make sense to consolidate all the iCal-related functionality for Drupal into a single module.

I kept the code organized the same way. I renamed the .inc files in the includes folder, but I didn't move much code between files.

ekes’s picture

Status: Active » Closed (won't fix)

OK I see all my code for the iCalcreator version is commited into the 2.x branch there; and I can agree with just focusing on one set of code.

So I'll depreciate this one in favour of that code.