Following the procedure in #38 at http://drupal.org/node/1015128, I get the folllowing error:

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /sites/all/modules/parser_ical/includes/ParserIcal.inc on line 31.

Line 31 is $sources = $this::$sources; - a search for the error message suggests it has something to do with the double colon operator.

The second patch from #38 - http://drupal.org/node/1213472#comment-5806320 - also fails to apply. Not sure if fixing this particular error will provide a working solution, but this thread looks to me like the only game in town right now.

Still looking for a working solution to iCal feeds in D7, I guess... yikes! Good to see some motion here... thanks much!

CommentFileSizeAuthor
#1 syntax-error-1619754.patch549 byteslsolesen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lsolesen’s picture

Status: Active » Needs review
FileSize
549 bytes

You should not apply a patch from #1213472: " Fatal error: Unsupported operand types in /FeedsConfigurable.inc" when importing, as it has been fixed in the latest dev.

The attached patch should resolve your issue.

However, you might need this patch also:

- #1415226: Does not play nice with locale enabled

bcobin’s picture

Thanks, @loslesen - I also see from checking on the modules page that the module requires PHP 5.3 - I'm on PHP 5.2, so I suppose it won't work in any case. (That would also explain the error, I think.)

Must've missed that in the documentation. I also installed using Drush, so I didn't see the warning on the modules page until much later.

Arrgh. Is it really possible there's no way to pull iCal feeds into D7? Oh, my.

Thanks for taking the time here - hopeful a solution will be forthcoming soon and thanks for the work you're doing here, even if I can't use it yet... :(

bcobin’s picture

OK - I've had PHP 5.3 installed on the server - now I get:

Fatal error: Unsupported operand types in /sites/all/modules/parser_ical/includes/ParserIcal.inc on line 38

Any ideas? Thanks much... standing by...

bcobin’s picture

Title: Syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in trying to implement D7 version » Unsupported operand types in /sites/all/modules/parser_ical/includes/ParserIcal.inc on line 38

Changing the issue title...

Well, I tried it again carefully, successfully applied the patches and still no go. Also renamed the iCalcreator-2.12 folder to iCalcreator, which I hadn't done before. (The same error comes up using Date API, BTW.)

Despite the error on the configuration page as soon as you hit "mapping," I tried importing an iCal feed anyway and get the following error message, which may, perhaps, shed some light?

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=83&op=do StatusText: OK ResponseText: Fatal error: Unsupported operand types in /sites/all/modules/parser_ical/includes/ParserIcal.inc on line 38

For reference, lines 24-39 of the patched file are as follows:

/**
   * Implementation of FeedsParser::getMappingSources().
   */
  public function getMappingSources() {
    // Quirky work around. 
    // Want to have the sources as a property of the class,
    // but can't declare them with t(). 
    $sources = self::$sources;
    foreach ($sources as $key => &$value) {
      if ($key == 'name' || $key == 'description') {
        $value = t($value['name']);
      }
    }
    // parent::getMappingSources() triggers target creation too.
    return $sources + parent::getMappingSources();
  } 

also the following error on the mail feed creation page:

Warning: Invalid argument supplied for foreach() in ParserIcalFeeds->getMappingSources() (line 32 of /sites/all/modules/parser_ical/includes/ParserIcal.inc).

The offending line is the following:

foreach ($sources as $key => &$value) {

Any ideas what I might be doing wrong here? Thanks... standing by...

gittosj’s picture

I was getting the same error on running cron or drush cron "Error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /sites/all/modules/sdague/includes/ParserIcal.inc, line 31". However a manual import was working fine - just periodic update causing the error and cron / drush failing.

Applied the patch in #1 which fixed this error but cron / drush still crash with a new error on line 61:

"Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in sites/all/modules/sdague/includes/ParserIcal.inc on line 61
Drush command terminated abnormally due to an unrecoverable error."

And can no longer manually import. Navigating to the feed mappings page gives an error of "Fatal error: Unsupported operand types in sites/all/modules/sdague/includes/ParserIcal.inc on line 38" . Try tio run the import manually gives:
"Warning: Invalid argument supplied for foreach() in ParserIcalFeeds->getMappingSources() (line 32 of sites/all/modules/sdague/includes/ParserIcal.inc)"

So for the moment I'll roll back to the 7.x-2.x-dev tarball which is great (allows me to manually import - many thanks for your hard work) but is failing on cron / drush periodic import.

I'm running PHP 5.3.3 with Drupal 7.15

Edit - Weirdly though drush updates are giving me the message: "iCal parser requires at least PHP 5.3. (Currently using PHP 5.2.17)" although php info shows 5.3.3 as does yum etc - confused?! Is the error message wrong....