Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The calendar block does not advance to the next month when you click on on the arrow. The main calendar page does advance.
Comments
Comment #1
Mattanniah CreditAttribution: Mattanniah commentedSame problem. Both next and previous buttons link to the same page you're currently on.
Comment #2
metakel CreditAttribution: metakel commentedsame here.
Below is the links for both "previous" and "next" arrows (the current node nid is 8) on the Calendar Block. Both arrows have the same link, indicating that there is some problem. When clicking them, nothing change except the page reloads.
I think normally it should be something like (when current page is 2011-03):
Comment #3
metakel CreditAttribution: metakel commentedI have just tested the 7.x-1.x-dev released on 2011 February 25. This error also happens.
Comment #4
filsterjisah CreditAttribution: filsterjisah commentedsubscribing
Comment #5
DaveMcLear CreditAttribution: DaveMcLear commentedI have the same problem, would like to know how to fix this.
Comment #6
tbenice CreditAttribution: tbenice commentedOK, I get the prev link but no next link.
Comment #7
tbenice CreditAttribution: tbenice commentedI think that this might be an issue with the date_views module. In theme.inc where the navigation links are generated (template_preprocess_date_navigation(&$vars)), the conditional statement that generates the $next_url and $prev_url vars has this statement:
if (!empty($next_date) && !empty($vars['next_url']) && date_format($next_date, 'Y') > $view->date_info->limit[1]) {
$vars['next_url'] = '';
}
if (!empty($prev_date) && !empty($vars['prev_url']) && date_format($prev_date, 'Y') < $view->date_info->limit[0]) {
$vars['prev_url'] = '';
}
dsm of $view in that function shows no date_info->limit property. I'll look in the date module queue for this. Mean-time, I'm going to comment out this statement.
UPDATE: The issue is in the date queue fyi- http://drupal.org/node/1086574
Comment #8
Anticosti CreditAttribution: Anticosti commentedSubscribing
Comment #9
vagrant CreditAttribution: vagrant commentedSame problem, month won't change in either direction
Modules installed:
Calendar 7.x-2.x-dev
Date: 7.x-2.x-dev
Views: 7.x-3.x-dev
Comment #10
kmoll CreditAttribution: kmoll commentedI had the same problem, so I dug through the api to figure out what the problem is, and I think I found it. In the theme.inc file the $vars['next_url'] and the $vars['prev_url'], call the date_real_url($view, Null, $next_arg), date_real_url($view, Null, $prev_arg), I looked up the api in the api.durpal.org, and it mentioned that date_real_url was in the date_api.module. After searching for it unsucessfully (date 7.x-2.x-dev) in that date_api module. I did find it in date_views.module. towards the bottom of that function (line 153), if it is the block view, its set to return a url function, and the query parameter was 'query' => drupal_get_query_parameters(Null, array($key =>$url)).
After looking up the drupal_get_query_parameters, the first argument should be the query and the second argument is $exclude, or things you want to exclude from the array keys, and that defaults to array('q'). So I got rid of the Null, and passed the array($key => $url) as the only parameter, and now it works.
Originally passing null, drfualts to the $_GET, so for me, it was always passing the argument of the page I was on, not the next or prev, month. After making the change the navigation is working for me.
I am new to git, I have my own repository with SVN, so I am going to read up on git, start checking out the projects from the drupal repository so I can provide a patch.
Comment #11
amysteen CreditAttribution: amysteen commentedI had the same issue, #10 fixed it for me too. Should this issue be moved to date module?
Comment #12
DaveMcLear CreditAttribution: DaveMcLear commentedThis worked for me also, brilliant work!...thanks :)
Comment #13
vagrant CreditAttribution: vagrant commented#10 works for me as well, Thank you very much :)
Comment #14
lionheart8 CreditAttribution: lionheart8 commentedCould you please post the code bit + corresponding lines for non-coders? ;)
Comment #15
kmoll CreditAttribution: kmoll commentedYes, it starts in the date_view/date_views.module at line 150.
$key = date_block_identifier($view);
if (!empty($key)) {
return url($_GET['q'], array(
'query' => drupal_get_query_parameters(NULL, array($key => $url)),
'absolute' => TRUE));
}
}
should be:
$key = date_block_identifier($view);
if (!empty($key)) {
return url($_GET['q'], array(
'query' => drupal_get_query_parameters(array($key => $url)),
'absolute' => TRUE));
}
}
Comment #16
Anticosti CreditAttribution: Anticosti commentedThanks for the details kmoll :)
Followed #15 detailed intructions and still impossible to navigate on the minicalendar block
here's the type of link generated:
node?mini=calendar-date/2011-04
Comment #17
kmoll CreditAttribution: kmoll commentedAnticosti,
That looks like the correct link, the mini is the default calendar block and and 2011-04 is the month of April, have you checked the setting on your view to make sure that it takes a date argument?
Comment #18
lionheart8 CreditAttribution: lionheart8 commentedThanks kmoll, that seems to solve the problem. :)
I could move to different months in both directions, with no problem.
A question:
In case you are using the latest date + alpha ordev versions of calendar, could you be getting this error message with the calendar block enabled? [http://drupal.org/node/1102664]
If not, what have you done to avoid it?
Regards
Comment #19
kmoll CreditAttribution: kmoll commentedI have not seen that error. I am using the current dev versions of both calendar and date. But if you open the file up, and you use the dsm function, if you have devel installed, you can print the object that that represents, and you can see if that property is missing, and if it is you can either figure out how to populate it, or figure out if the code needs a different property to function properly.
Comment #20
mkmaroon CreditAttribution: mkmaroon commentedNot sure if this is the correct place to put this, but I am technically having the problem that the calendar doesnt advance to to the next month. Pretty much none of the buttons (day, week, month, year, next month, previous month, an individual day or week) work. I know why it doesnt work I'm just not sure how to fix the problem.
I've embedded the calender page into a node like this:
I'm using the calendar 'Page' because I want all the features (links for day, week, month, year, next month, prev month, etc.)
So now this calendar rests on a URL like this: mysite.com/path-to-node
While the actual calendar is at: mysite.com/calendar
(note: the calendar works just fine on mysite.com/calendar)
The problem is, while on my node where I have embedded the calendar, all the links point to: mysite.com/path-to-node?=calendar/2011-03 (2011-03 is just an example).
I have figured out that if I modify my embed code above to accept parameters like this:
then I can use URLs like this: mysite.com/path-to-node?a=2011-06 and it works! I'm just not sure how to configure my links to output like that (as opposed to mysite.com/path-to-node?=calendar/2011-03 ). Also I might be looking at this all wrong and there might be another or an easier way to accomplish my goals.
If I have posted this in the wrong place I apologize.
Any help would be greatly appreciated.
Thank you.
Comment #21
Anticosti CreditAttribution: Anticosti commentedIn Ref to #17:
Thanks kmoll!!! This is working now.
Cheers,
Comment #22
pazap47 CreditAttribution: pazap47 commentedExcellent kmoll # 15 works here as well.
Comment #23
KarenS CreditAttribution: KarenS commentedThe mini calendar navigation should now be fixed, but not in exactly the same way mentioned above.
Comment #24
vagrant CreditAttribution: vagrant commentedUpdated TODAY to the latest dev versions on:
Calendar
Views
Ctools
Date
and flushed the cache (a few times)
This was to resolve the "no day event info" issue
The fix from #15 (Kmoll) worked fine before updating and now it does NOT work anymore. Additionally, my events on the calendar no longer show (I saw the other issue for this).
This is a fresh install of D7, not an upgrade.
Thanks
Comment #25
kmoll CreditAttribution: kmoll commentedWhat issue are you still having? One with the navigation of the calendar block, or an issue with day event info? I haven't looked at the latest release since it was put out.
Comment #26
vagrant CreditAttribution: vagrant commentedHi Kmoll,
Actually both or more accurately all 3 issues:
1. Month doesn't move move with arrow buttons
2. Events no longer show on the calendar
3. Day view is inaccessible (see #2) but when I could see the page view it was still blank
#1 was undone by the update to the latest dev (prior your fix worked great)
#2 is a new issue after the update
#3 original issue that the update was made for. Not only didn't fix that issue but caused the breaks #1 & #2
Thanks again
Comment #27
kmoll CreditAttribution: kmoll commentedok, like I said I haven't gotten a chance to look at the new update, hope to do so this weekend while I work on my project. My original fix, was just kind of a band-aid, not sure if it works in the scheme of how Karen structures the module. Hopefully I will get a chance to go through it and help her find a permanent solution
Comment #29
vagrant CreditAttribution: vagrant commentedSorry, but this situation stills exists.
Thanks
Comment #30
TelFiRE CreditAttribution: TelFiRE commentedI do not understand how people are finding #10 to solve their problem. No such file exists. There is no date_views.module file in calendar or any other addon that I can figure. There is no date_view folder. There is nothing of the sort.
Comment #31
kmoll CreditAttribution: kmoll commentedTelFiRE
I have been on a different project and have not been able to follow up on this problem since this thread initial began. At that point, that file did exist and there were some issues. I made a quick changed that seemed to solve the problem temporarily until a permanent problem could be implemented. I know this module has gone through many updates since then and solved many bugs that had popped up. Its possible that that section of code was integrated into another part of the module or taken out all together, I can't be too sure with out looking. Are you still experiencing this problem?
Comment #32
cabplan CreditAttribution: cabplan commentedTried to follow #15 but cannot find this file indicated. My Next/Prev buttons do not work, it remains on the same month (nov) but the URL changes.
Comment #33
adamickes CreditAttribution: adamickes commentedFor anyone still seeing this problem. Setting caching to none (under Advanced) in the calendar view fixed the issue for me.
Comment #34
Ajtis.pl CreditAttribution: Ajtis.pl commentedI have disbaled Block Cache in preformance tab.
And it helps :)