It is only a notice but it hits 3 times on ever page load and is filling up my syslog. It is really easy to fix. I just suppressed the notice.

Original code

    foreach ($items as $pos => $item) {
      $delta = !empty($field['delta_field']) && !empty($item->{$field['delta_fi$
      $id = 'calendar.' . $item->id . '.' . $real_field . '.' . $delta;
      // When creating iCal feeds for repeating dates we don't want all
      // the multiple values, send only the first value.
      if (strstr($view->current_display, '_ical')) {
        if (!isset($rrule_processed[$item->id])) {
          $rrule_processed[$item->id] = TRUE;
        }
        else {
          continue;
        }
      }

Replacement Code

    foreach ($items as $pos => $item) {
      $delta = !empty($field['delta_field']) && !empty($item->{$field['delta_fi$
      @$id = 'calendar.' . $item->id . '.' . $real_field . '.' . $delta; // <- Only change.
      // When creating iCal feeds for repeating dates we don't want all
      // the multiple values, send only the first value.
      if (strstr($view->current_display, '_ical')) {
        if (!isset($rrule_processed[$item->id])) {
          $rrule_processed[$item->id] = TRUE;
        }
        else {
          continue;
        }
      }

Thanks
Robert

Comments

Renegadez’s picture

I have this same issue every time after posting a calendar event. How do I suppress the error? Is this error causing or going to cause issues with the calendar or site any info could help Thanks!

Ok I added your 2 wacks // at the end of the line it did not seem to clear or hide the error I am not sure what I did wrong this an issue all my users think the calendar is broken! I also cleared all caches to be Admin 7 views Thanks

rmiddle’s picture

Renegadez,

Add an @ at the begging of the line I added the // Comment to the end of.

Thanks
Robert

Note. // in PHP make everything after it a comment.

Drupaluser73’s picture

Thanks!!! This also fixed my issue.

Renegadez’s picture

Thank You I missed the @ symbol Thanks !

pressduck’s picture

Hi, sorry for asking but I'm a user, not programer with this aanoying issue on my front page: where exactly (in which file and where exactly ) should I replace the code? A clearer instruction would be very appreciated. Thanks.
Ales

mercergirl’s picture

The answer you seek is in the complete error message... line 663 in calendar.module.

The path to calendar.module is in the error message also: $id in calendar_build_nodes() (line 663 of YOURPATH\htdocs\drupal\sites\all\modules\calendar\calendar.module).

pressduck’s picture

Thanks, I'll try that path, I suppose it can be edited with a wordpad or similar text editor...

Renegadez’s picture

yes it is in line 663 if you use notepad ++ it actually shows the line #s I use it all the time for editing and its free

http://notepad-plus-plus.org/

As he states the existing line needs to be changed to this line without the change only on the end basically adding the @ symbol to the beggining of the line and // at the end of the line it worked for me!!

@$id = 'calendar.' . $item->id . '.' . $real_field . '.' . $delta; // <- Only change.

pressduck’s picture

Thanks, it worked, I hope this kind of bugs will be updated soon, not only in calendar but in all ported D7 modules. I get a lot of weired stuff like this from other alegedly D7 working modules...

Renegadez’s picture

Drupal 7 Admin / Config Links for configuring modules missing!!
http://drupal.org/node/1039072

Currently i am having issues like this out of D7

sammyframson’s picture

Worked for me as well.

zabelc’s picture

I just gave this a try with 7.x-1.x-dev and the fix instructions worked.

Any chance someone could generate a patch or commit this to CVS?

brianfreytag’s picture

This is not a fix... This is a workaround! This only "hides" the problem, not solving it.

View this ticket:

http://drupal.org/node/1029096

The problem lies in the line that defines the variable $id.

If you echo all of the variables in that line, you'll find that $item->id returns null... Then you'll see

<div class="calendar..field_dates.0.0 contents">...</div>

Where those two periods are, there is supposed to be an ID there. It isn't.

Note that this issue ONLY arises when you have Calendar Multiday Enabled

We need to find a fix for this... Not a hacky workaround.

DrChickenbeer’s picture

Priority:Minor» Major

Help!

I made the above change and now I get this message when I go to my site:

Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/pchizeck/montavilla.coop/sites/all/modules/calendar/calendar.module on line 663

I can't access my site now.

Thanks!!!

Drupaluser73’s picture

I also noticed that the error disappeared, but there's still a issue with Calendar Mulitday. If i apply this work around and input more then one event on the same day I will have a issue. If i disable the Calendar Multiday it works, but calendar doesnt look as great.

developer-x’s picture

Please try the development version of the multiday calendar (7.x-1.x-dev) - let me know if that fixes the issue.

visum’s picture

I can confirm that 7.x-1.x-dev eliminates the error message.

developer-x’s picture

Status:Active» Fixed
dibya’s picture

it worked for me . I added @ as informed above

jaddamo’s picture

It's work, thanks!!!

cabplan’s picture

So I have D7 installed and I am trying to get my Calendar to just display my Content type called Event. But I am having issues, it displays:

* Notice: Undefined property: stdClass::$limit in template_preprocess_date_navigation() (line 55 of /home/concor16/public_html/sites/all/modules/date/date_views/theme/theme.inc).
* Notice: Undefined property: stdClass::$limit in template_preprocess_date_navigation() (line 58 of /home/concor16/public_html/sites/all/modules/date/date_views/theme/theme.inc).

I have done before in a D6 calendar and trying to use the same Arguments and Fields but I cannot find the same parameters like "Content: Event Date - From date Default", All I see is Fields: field_event field_event, Does anyone know how to work the calendar in D7, any help would be most appreciated.

One thing I noticed with my D6 modules is that in CCK there are Content modules but the CCK I have for D7 does not have this, would this be why I do not see the "Content: Event Date - From date Default" in the Calendar View

So basically I have D7, how do I get a calendar working, what modules, fields, and arguments do I need?

cabplan’s picture

of what file am I suppose to add this new code?

cabplan’s picture

adding the @ on the calendar.module did not fix the issue. tried both commenting out that line and using the @ but I still get this error:

* Notice: Undefined property: stdClass::$limit in template_preprocess_date_navigation() (line 55 of /home/concor16/public_html/sites/all/modules/date/date_views/theme/theme.inc).
* Notice: Undefined property: stdClass::$limit in template_preprocess_date_navigation() (line 58 of /home/concor16/public_html/sites/all/modules/date/date_views/theme/theme.inc).

is this still the same problem?

developer-x’s picture

As mentioned in comment #16, please download and install the latest dev version (7.x-1.x-dev) - that has the fix for this problem.

cabplan’s picture

Ok I downloaded the latest version and it worked fine. thx sorry for the freak out

cabplan’s picture

Ok the latest download go rid of that but when I submit a Event to my calendar I get this error now:

* Notice: Undefined property: stdClass::$type in calendar_build_nodes() (line 828 of /home/concor16/public_html/sites/all/modules/calendar/calendar.module).
* Notice: Undefined property: stdClass::$node_type in template_preprocess_calendar_node() (line 762 of /home/concor16/public_html/sites/all/modules/calendar/calendar_multiday/theme/theme.inc).

Does anyone know why this is?

cabplan’s picture

Another question is that my old calendar used the jquery_ui so that when you click on the event it would pop up the event in a balloon. all i see for jquery_ui is for D6, how do I get this to work in D7?

arlinsandbulte’s picture

jquery_ui is included in D7 core now.
All you need to do is enable the Date Popup module :-)

cabplan’s picture

Date Popup module is already activated so not sure what else to do. I though Date Popup module was for when you are creating an event and you click on the "From" field, is that correct? That works fine. The popup that is not working is after the event is already created, on the calendar, in my D6 calendar you can click on the event in the calendar and window pops up with a summary, that does not happen in my D7 calendar. The Title of the link just jumps straight to the node that was created for the event. Please let me know if I am missing something.

Also whenever I create new event, I a red box appears above my calendar saying this:

* Notice: Undefined property: stdClass::$type in calendar_build_nodes() (line 828 of /home/concor16/public_html/sites/all/modules/calendar/calendar.module).
* Notice: Undefined property: stdClass::$node_type in template_preprocess_calendar_node() (line 762 of /home/concor16/public_html/sites/all/modules/calendar/calendar_multiday/theme/theme.inc).

arlinsandbulte’s picture

cabplan:
You are thinking of the Calendar Popup module (as opposed to the Date Popup module).
Enabling that will open events in a balloon window...

I think it is still there in D7, but not sure.

cabplan’s picture

I checked the modules under calendar bur where do I activate calendar pop up I am not sure where to do this

developer-x’s picture

This issue raised in #29 is duplicate of #1090718: Undefined property: stdClass::$type in calendar_build_day(). I've provided a patch which I believes addresses this problem. If I can get some eyeballs on it to review the fix - that would be great

ymazigo’s picture

add @ at the beginning of the line 663

Original code
$id = 'calendar.' . $item->id . '.' . $real_field . '.' . $delta;

Replacement Code
@$id = 'calendar.' . $item->id . '.' . $real_field . '.' . $delta;

fix my issue
Thanks guys

dibya’s picture

Thanks. Adding @ I worked for me . But surprisingly it is not modified even in the latest calender 7.x.2.x dev module. Is there any reason?

Status:Fixed» Closed (fixed)

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

acbramley’s picture

Adding the @ symbol didn't fix this for me.