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.
I was wondering if someone has the same problem as me.
The AJAX mechanism for paging is not working for the block calendar (mini calendar). It's working on the preview but not on the block himself.
I use theses modules:
- Drupal Core 7.10
- Views 7.x-3.0-rc3
- Date 7.x-2.0-alpha5
- Calendar 7.x-3.0-alpha1
Comment | File | Size | Author |
---|---|---|---|
#10 | bugpic.png | 45.63 KB | chaky |
Comments
Comment #1
acolyte26 CreditAttribution: acolyte26 commentedI am having the exact same problem as well.
Comment #2
Jibus CreditAttribution: Jibus commentedBased on the AJAX navigation in month view ticket, it seems that it's a not a bug but mostly a feature request.
Anyway, I managed to add the no-relead page feature, thanks to the solution provided by Architeck (http://drupal.org/node/339279#comment-2006476) which use Jquery.
Below, the code for Drupal 7.
You may have to adapt these, according to your theme
Of course, this is not very pretty. But for me, it does the job !
Comment #3
KarenS CreditAttribution: KarenS commentedAjax paging should work out of the box. It requires two settings in the view. First, you have to set Ajax = yes. Then you have to edit the Date pager and make sure you are using the 'Pager' format. The 'Clean' format will not work in ajax. With those two settings it should work fine with no additional code.
Comment #5
cesabal CreditAttribution: cesabal commentedI use, the pager format, and i have enabled the ajax = yes, but this not work for me
Comment #6
Jibus CreditAttribution: Jibus commentedKarenS, i tried your solution, but i still can't get the calendar block ajax to work.
I have to mention that i have override the default template.
Comment #7
capellicSame issue over here. When shown in a block on my default events page (/events), the pager works so that I may go the previous or next months with no problems. I can get from the current month (April) to May, June, July etc as well as March, February, etc.
Also, I am able to use the prev/next links when on a page filtered for a day (/events/2012-03-14).
The problem comes in on pages that have the "mini" argument (/events/2012-03-14?mini=2012-03). When clicking the prev/next links, I get the spinner, but then nothing happens. When I hover over the prev/next links, the URL looks good (/events/2012-03-06?mini=2012-04).
Comment #8
KarenS CreditAttribution: KarenS commentedIf you are using alpha1, as this version says, you need the latest code. Everything is working fine with the latest dev versions of both Date and Calendar so long as you use the 'pager' links and set the view up to use ajax.
If you still have trouble after that you may have some other module or code intefering. If you can't reproduce a bug on a clean install with just Date and Calendar enabled it is likely something else causing the problem.
Comment #9
capellic@KarenS -
I've upgraded to 3.3, upgraded Date, and I'm still having the problem described in #7.
Thank you.
Comment #10
chaky CreditAttribution: chaky commentedYah, me as well. When I click on the next on the block, I could go to next month, but after clicking the next again, nothing happens. It's really crazy. When I open the developer console, it says "event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future."
BTW, I use Chrome 19 if you need the information.
Comment #11
capellic@chaky: From you description, this isn't exactly my case. In my case, I can go forward and back as much as I want until I click on a mini link and then get the mini argument:
Can you clarify your use case?
Comment #12
mboeschen CreditAttribution: mboeschen commentedSame situation as #10. Happens in both Chrome 19 and IE9. And sometimes I get it to display one month before, and then it seems to cache it. So then on every browser I see the previous month, but can't change the month. Once I clear the cache, it goes back to the current month, still can't change. Calendar 7.x-3.4, Date 7.x-2.5, Drupal 7.14
Comment #13
zenlan CreditAttribution: zenlan commentedIgnore, my bad!
edit: DOH!!!! I never even noticed that the view, which was created using a "Calendar" template, actually had caching switched on by default! Switched it off and the issue goes away.
Comment #14
ironman67 CreditAttribution: ironman67 commentedWhen navigating to a previous or next month, ?mini=year-month gets added to the calendar day urls. I found that if I removed the ?mini=year-month parameter from the urls the calendar then functioned properly with no odd side effects. I could not find in the calendar code where the ?mini=... parameter gets applied so I applied some js code instead to resolve the issue. Since the site this was on was using an older jQuery version I used the .live() function rather than .on(). Removes the ?mini= parameter onclick.
var parmchk = new RegExp("\\?mini=\\d{4}-\\d{2}");
jQuery('table.mini td a').live("click", function(){
jQuery(this).attr("href",jQuery(this).attr("href").replace(parmchk,""));
});
Comment #15
capellicThe JS code discussed in #14 was added to the theme's javascript file.
Comment #16
Anonymous (not verified) CreditAttribution: Anonymous commentedI can also confirm that disabling caching corrects all of my woes with Calendar. I'm not referring to site caching, click on "Advanced" link to display the advanced options for the view. Look at the cacheing option, most likely if you see something set there that is the cause of all your problems. Click on it and set it to none. This fixed all the weird problems such as one month being skipped, not being able to go to next or previous months from a certain month ...etc. I was pulling hair and gritting teeth because non of these errors made any sense. I have 4 calendars setup similarly and i was having problems only with the third and fourth calendars. Threw me off completely ... learned my lesson i know from now on when encountering bizarre behavior in drupal or modules the most likely sources are the cache and or ctools. I hope this helps others avoid alot of frustration. Thank you ZenLan for your post.
Comment #17
pramses CreditAttribution: pramses commentedThis is true. Most problems come from caching as the view cannot load new values through ajax.
Disabling caching solves the problem but the performance is bad if you have many events.
In my case with 5 events per day the page takes 4x longer to load.
I would be happy if someone could give some ideas to solve this.
Comment #18
marcus178 CreditAttribution: marcus178 commentedAs far as I can tell Ajax doesn't work at all on the mini calendar, I have no cache on the view and set as detailed in the post and it just doesn't work.
Comment #19
Immansophia CreditAttribution: Immansophia commentedironman67: Greetings. This refers to item #14. I am having the same issue with regards to the ?mini=some parameter. During testing we found that the calendar loses some dates and does not display properly if the following parameters are appended to the query string.
?mini=12345-12345+2014-05-14
Any help to fix this would be appreciated. I am using Calendar version 7.x-3.4
Thanks,
Comment #20
liborvanek CreditAttribution: liborvanek commentedThis might as well be a problem of overridden views-view.tpl.php.
Try default theme first and then try again with your theme. If the problem occurs in latter only, try reverting to default views-view.tpl.php.
Comment #21
Biswajit Roy CreditAttribution: Biswajit Roy commentedSame issue I was suffering from. I had enabled "Caching" of views. I able to find that the cache is the issue for calender load using Ajax, so, I have set cache configuration of views to "None", after that it's working.
Cheers,
B. Roy
Comment #22
apaderno