Closed (fixed)
Project:
Calendar
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2012 at 18:50 UTC
Updated:
16 May 2012 at 10:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
artatac commentedHaving just updated to the latest calendar and date dev - I am also getting
Comment #2
wayne57 commentedI am also getting this error.
I have recently installed the token and pathauto modules, and am not sure whether this notice appeared before.
Is there a fix for this?
Comment #3
wayne57 commentedfor completeness, this is the error i get:
Comment #4
wayne57 commentedI fixed this.
I had two calendar views enabled. I forgot to disable after I cloned. Also I set the format to Calendar Items (DEPRECATED, switch to Calendar Entities) by mistake and after I corrected this failed to notice it had set on all displays.
I deleted the entire view, cloned a new one and disabled the default, now everything works fine.
Comment #5
karens commentedSo this is fixed, right? If it works right in the latest dev there is no bug.
Comment #6
Jaza commentedI'm still getting this error. After upgrading to latest views, uninstalling and re-installing calendar module, and re-creating my calendar view (this time, using the new 'add view from template' feature), same problem.
Note: the error reported by wayne57 above was:
Undefined variable: type in calendar_granularity_path() (line 518Whereas mine is:
Undefined offset: 2 in calendar_granularity_path() (line 526(Was 'offset: 3', has now changed to 'offset: 2', otherwise same error).
So, would seem to me that wayne57's reported problem is a different one, possibly one that can be fixed without a patch.
Applying my patch still fixes this issue, for me.
Comment #7
karens commentedI can't replicate the error but the patch makes sense, so committing it.
http://drupalcode.org/project/calendar.git/commit/3bac338
Comment #8
josaku commentedI have the following similar notice after upgrading to 7.x-3.0.
Notice: Undefined index: arguments calendar_granularity_path()...
I'm not sure but the attached patch works for me.
Comment #9
hynnot commented+1 #4 Posted by wayne57
If you enter to the view, you can change the format DEPRECATED to Calendar Entities. Not it's necessary delete the view.
Comment #10
janeinar commentedThe patch worked for me.
Comment #11
dealancer commentedpatch #8 fixed only some of notices, while I am continue to get other notices/
Comment #12
dealancer commentedHere is a patch that fixes errors mentioned in the issue and comments #1, #3 and #11. Based on patch #8.
Comment #13
fraygos commentedThe patch in number 12 worked for me.
Will these patches go to the next commit/update?
Or else I am going to be running into the same problem again ... :(
I tried changing the format and errors still happening. Trying to remove the view and re-add was not helping either ...
Thanks for the patch
Comment #14
stijn vanhandsaeme commentedpatch #12 workd for me. Thanks!
Comment #15
drod commentedPatch #12 worked perfect. Thanks!
Comment #16
dealancer commentedCool :) Can anyone review the code and update issue status to 'reviewed and tested by the community'?
Comment #17
audua commentedI only get this error after I try to use features with calendar. Has anyone tried this? I have not apply the patch on #12
Comment #18
dealancer commentedI am also using Features, have not checked without them.
Comment #19
alex.neblett commentedPatch works great. Have tested extensively even in corner cases.
Please tested my patch as well:
http://drupal.org/node/1466698
Great job,
Alex
Comment #20
m-si commentedI have been patching current 3.x dev with patch #12. patch of #12 does corrupt links of day numbers in month view (if one uses the deprecated calender view) they link points to month view instead of day view. The patch didn't work for me
sorry
m-si
update: #11 in this fixed the whole bug without patching
Comment #21
athrylith commentedI had the same problem when using features, applying the patch #12 solved the problem
Cheers
Martyn
Comment #22
jlea9378 commentedWorked for me also. Can this get committed in dev?
Comment #23
penguininja commentedI can confirm that in my case this error only appears when my calendar view is managed by Features. I created a new view without errors, and it wasn't until I pushed that view to code that the errors showed up.
The patch in comment 12 does remove the errors, but it also removes the "Month" tab. Is anyone else experiencing this issue?
@m-si I'm also seeing the incorrect day link issue you mentioned, though not necessarily related to the patch. AFAICT this happens whenever my calendar view is in code, with or without the patch in 12.
Comment #24
jlea9378 commentedMy month tab didn't vanish. However, my year tab points to my upcoming page (within the calendar-date view). But I am certain this is unrelated to the patch.
Comment #25
tac11tac commentedI was having a variety of issues after upgrading to Calendar 7.x-3.x. Finally, I committed to getting everything up to the latest and greatest. Including updating to the -dev version.
Drupal 7.12
Calendar 7.x-3.0+4-dev
Date 7.x-2.2
Views 7.x-3.3
Ctools 7.x-1.0-rc1
I've got everything displaying fine, now, however still getting these Notices and Warnings on every /calendar/* page. How would I use the above patch(s) to hopefully fix this problem? I am a developer, but not a php/drupal developer... yet. It is coming.
Thanks.
Todd
Notice: Undefined index: arguments in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Warning: Invalid argument supplied for foreach() in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_granularity_path() (line 518 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined index: arguments in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Warning: Invalid argument supplied for foreach() in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_granularity_path() (line 518 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined index: arguments in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Warning: Invalid argument supplied for foreach() in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_granularity_path() (line 518 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined index: arguments in calendar_preprocess_date_views_pager() (line 144 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Warning: Invalid argument supplied for foreach() in calendar_preprocess_date_views_pager() (line 144 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_preprocess_date_views_pager() (line 151 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined index: arguments in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Warning: Invalid argument supplied for foreach() in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_granularity_path() (line 518 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_preprocess_date_views_pager() (line 152 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_preprocess_date_views_pager() (line 153 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined index: arguments in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Warning: Invalid argument supplied for foreach() in calendar_granularity_path() (line 512 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Notice: Undefined variable: type in calendar_granularity_path() (line 518 of /home/content/28/8463028/html/sites/all/modules/calendar/calendar.module).
Comment #26
rwilson0429 commentedPatch in #12 worked for me too. Thanks dealancer.
Comment #27
jlea9378 commented@tac11tac:
Save the patch to a file (right-click and save as), then put it in your Calendar module directory. From the command line run the command 'patch < filename.patch' where filename is whatever the name of the patch is. If it prompts for the file to be patched, that would be calendar.module, which should be in your current working directory.
Comment #28
spgd01 commented#12 fixed my issue here:
http://drupal.org/node/1441554
Comment #29
RyanPrice commentedCan also confirm patch in #12 worked for me. Thank you.
Comment #30
delty commentedConfirmed #12 also fixed it for me. Thanks!
Comment #31
Foonaka commentedPatch in #12 also worked for me! Thanks!
Comment #32
drgoplayer commentedDeleting all the views and creating a new view from "Add view from template" worked for me without applying the patch. See http://209.191.186.157/calendar-field-event-date/month
Comment #33
karens commentedFixed some of this in #1485790: Undefined index Error Bug. Picked up the rest manually.
Thanks!
http://drupalcode.org/project/calendar.git/commit/639a0a9
Comment #34
wielrijder commentedI was having the same problem and before trying the patch tried out drgoplayer's #32 fix and found it worked for me too. Thanks for the tip....
Comment #35
Frederic wbase commentedAltough this issue is verry strange patch from #12 works wunderfull, many thanks!
Comment #36
arlinsandbulte commented@wielrijder & @Frederic wbase:
KarenS said she fixed this in #33.
It would be best if you confirmed her fix by using the latest -dev instead of testing patches that have not and will not be applied.
Comment #37
Frederic wbase commented@arlinsandbulte i've tried the commit but the problem remains the same for me
Comment #38
a1russell commentedI am also still experiencing this problem with the latest 3.x-dev version.
Comment #39
karens commentedDid you pick up the latest version of Date module? Are you still using the deprecated calendar views or did you build new ones using the template? Can you replicate the error on a fresh install? If so, what are the steps to reproduce?
The error does not appear anywhere that I can see when using the right versions of everything. Since I cannot reproduce it in the latest code there is nothing that can be done.
Comment #40
merilainen commentedI got rid of the warnings by updating to latest dev-version
Comment #41
emorency commentedI had the same problem even if I was using the latest dev version. When the view was created from templates, it worked but after an export/import through a Feature the errors came back...
I found that when the view is exported, Week, Year and Day had the following variable set:
$handler->display->display_options['arguments']['date_argument']['granularity'] = 'week'; // year or day
but the Month display was missing that argument... By manually adding the line:
$handler->display->display_options['arguments']['date_argument']['granularity'] = 'month';
with the month display, it solved part of my problem...
Comment #42
dkingofpa commentedI'm still getting undefined variable notices:
"Notice: Undefined variable: type in calendar_granularity_path() (line 529 of /path/to/calendar/calendar.module)."
Using Date 7.x-2.3 and Calendar cloned from 7.x-3.x (commit: 3f4c3c70f25b980800e381e81d99f74a3ccf7711).
I applied the attached patch and no longer get those notices.
Comment #43
dkingofpa commentedI'm still getting undefined variable notices:
Using Date 7.x-2.3 and Calendar cloned from 7.x-3.x (commit: 3f4c3c70f25b980800e381e81d99f74a3ccf7711).
I applied the attached patch and no longer get those notices.
Comment #44
schultetwin commented#41 Also fixed my issue. Nice catch, I would have never have thought to look at that.
Comment #45
karens commentedThe remaining issues are eliminated by #1535346: Rework calendar tabs, which gets rid of the custom tabs.
Comment #46
a1russell commentedThis issue is not fixed as of today using dev versions of Calendar, Ctools, Entity, Date, and using the Calendar Entities format:
Notice: Undefined variable: type in calendar_granularity_path() (line 523 of /path/to/calendar/calendar.module).Comment #47
karens commentedOK, yes, Views omits that value in an export, so we need a default fallback. Fixed slightly differently:
http://drupalcode.org/project/calendar.git/commit/e6629e1
Comment #48
Frederic wbase commentedThanks for the effort KarenS, in a couple of days i will test it out and post my feedback over here
Comment #49
a1russell commentedThe fix seems to work for me. Thanks!
Comment #50
tac11tac commentedFrom #25 above... upgraded to latest dev on ?4/18? and it fixed the issue. Current version is 7.x-3.2+0-dev.
Thanks.
Todd
Comment #51
q11q11 commented