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
Comment #1
Renegadez commentedI 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
Comment #2
rmiddle commentedRenegadez,
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.
Comment #3
Drupaluser73 commentedThanks!!! This also fixed my issue.
Comment #4
Renegadez commentedThank You I missed the @ symbol Thanks !
Comment #5
pressduck commentedHi, 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
Comment #6
Anonymous (not verified) commentedThe 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).
Comment #7
pressduck commentedThanks, I'll try that path, I suppose it can be edited with a wordpad or similar text editor...
Comment #8
Renegadez commentedyes 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.
Comment #9
pressduck commentedThanks, 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...
Comment #10
Renegadez commentedDrupal 7 Admin / Config Links for configuring modules missing!!
http://drupal.org/node/1039072
Currently i am having issues like this out of D7
Comment #11
sammyframson commentedWorked for me as well.
Comment #12
zabelc commentedI 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?
Comment #13
brianfreytag commentedThis 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
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.
Comment #14
DrChickenbeer commentedHelp!
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!!!
Comment #15
Drupaluser73 commentedI 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.
Comment #16
developer-x commentedPlease try the development version of the multiday calendar (7.x-1.x-dev) - let me know if that fixes the issue.
Comment #17
visum commentedI can confirm that 7.x-1.x-dev eliminates the error message.
Comment #18
developer-x commentedComment #19
dibya commentedit worked for me . I added @ as informed above
Comment #20
jaddamo commentedIt's work, thanks!!!
Comment #21
cabplan commentedSo 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?
Comment #22
cabplan commentedof what file am I suppose to add this new code?
Comment #23
cabplan commentedadding 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?
Comment #24
developer-x commentedAs mentioned in comment #16, please download and install the latest dev version (7.x-1.x-dev) - that has the fix for this problem.
Comment #25
cabplan commentedOk I downloaded the latest version and it worked fine. thx sorry for the freak out
Comment #26
cabplan commentedOk 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?
Comment #27
cabplan commentedAnother 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?
Comment #28
arlinsandbulte commentedjquery_ui is included in D7 core now.
All you need to do is enable the Date Popup module :-)
Comment #29
cabplan commentedDate 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).
Comment #30
arlinsandbulte commentedcabplan:
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.
Comment #31
cabplan commentedI checked the modules under calendar bur where do I activate calendar pop up I am not sure where to do this
Comment #32
developer-x commentedThis 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
Comment #33
ymazigo commentedadd @ 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
Comment #34
dibya commentedThanks. 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?
Comment #36
acbramley commentedAdding the @ symbol didn't fix this for me.