I created a new content type, that shows up in all calendar views. So my event calendar is full of events of this content type. I think this causes a problem with the event RSS feed, which shows no content.

This problem came up (I think) when I upgraded the event module to version 5.x-2.x-dev. I'm not able to track this issue down to the code. Anyone else maybe?

Comments

rtdean93’s picture

I too just upgraded to the latest dev module and am having the same problem. When I click on the ics file it launches my ical application, but imports the events instead of creating a calendar feed that one subscribes to.

Any fix?

killes@www.drop.org’s picture

Status: Active » Postponed (maintainer needs more info)

The original bug report is about RSS feeds, the follow up abotu iCal...

I have seen several event 5.2 RSS feeds that are fully working.

altparty’s picture

I would like to give more info, but what kind of info do you need?
- I checked with feedvalidator.org and the feeds seems to be valid, but is also empty.
- I have no problems with other feeds on my site.
- The events in the calendar are based on one CCK content type.
- The ical-output seems to be ok.

If you need more info, pls. ask.

altparty’s picture

In addition: Found this error message it the log, when clicking the feed icon.

mysql_real_escape_string() expects parameter 1 to be string, array given in /var/www/vhosts/altparty.net/httpdocs/includes/database.mysql.inc op regel 400.

l0rne’s picture

Drupal 5.5
Event 5.x-2.x-dev

I get these two errors in the log whenever I hit the event RSS feed link:

date_parse() expects parameter 1 to be string, array given in /home/healthinfo/vhosts/drupal5/sites/beta.chinesemedicinetools.com/modules/event/event.module on line 2676.

and

mysql_real_escape_string() expects parameter 1 to be string, array given in /home/healthinfo/vhosts/drupal5/includes/database.mysql.inc on line 400.

I have been trying to track down the source of the problem.

the "date_parse error" poitns to the "event_explode_date" function. The "event_calendar_rss" fuction calls the "event_get_events" function, which calls one of "event_get_events_user", "event_get_events_site", or "event_get_events_event", which all live in "event_database.mysql.inc". "event_explode_date" is called here, presumably with an array rather than a string.

This is as far as I was able to get before having to move on to other things. Any help in resolving the problem would be great!

oh, wait... I just found something that fixes the problem.

In the file event.module, line 731, I changed

$result = event_get_events($date, $end_date, $rewrite_parameter);
 

to

 $result = event_get_events(event_implode_date($date), event_implode_date($end_date), $rewrite_parameter);
 

This is how event_get_events is called in the "event_calendar_ical" function.

The feed now shows content, and the errors are gone.

altparty’s picture

@ L0rne: Thanks, that solved the problem.

killes@www.drop.org’s picture

Status: Postponed (maintainer needs more info) » Fixed

fixed now.

jtjones23’s picture

I'm still getting error messages and no events in the RSS feed. I'm using the May 9th dev.

date_parse() expects parameter 1 to be string, array given in /usr/www/users/myaccout/mysite/sites/all/modules/event/event.module on line 2680.

mysql_real_escape_string() expects parameter 1 to be string, array given in /usr/www/users/myaccount/mysite/includes/database.mysql.inc on line 400.

Drupal 5.7
PHP 5.2.5
MySQL 5.0.45

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

dugh’s picture

Status: Closed (fixed) » Active

I tried the fix and get those errors too jt_jones.

I take it back. After I cleared the view cache and went back the errors weren't there.

But still this fix wasn't fully committed to the module. Only the first $date parameter was wrapped in a call to event_implode_date(), not the $end_date parameter.

In the event.module event_calendar_rss function change it to be like this line:

  $result = event_get_events(
        event_implode_date($date), event_implode_date($end_date), 
dugh’s picture

Status: Active » Reviewed & tested by the community
will kirchheimer’s picture

Just added the :

$result = event_get_events(event_implode_date($date), event_implode_date($end_date), $rewrite_parameter);

to my 5.2.dev install
fixed database errors, fixed rss feeds not ical

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

This is fixed now from another patch. Note that this issue didn't have a proper patch.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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