Complete Pager Fail
EclipseGc - March 19, 2009 - 04:50
| Project: | Calendar |
| Version: | 6.x-2.0 |
| Component: | User interface |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
When calling a calendar manually utilizing date_embed_view() within a block the pager elements completely fail. I've tried an awful lot of really hacking things to get this to work but, reasonable or hacky, I get essentially the same reaction, which is either nothing at all, or a mostly blank month (except for one day). Very odd.
Please help, this is eating my lunch.
Eclipse

#1
subscribing. i've seen this as well.
#2
Try using the latest -dev versions of Date, Calendar, CCK, and Views. I've had no problems in the latest code. If you still have problems there I need more info about what parameters you fed to date_embed_view() and an export of your view.
#3
ok, so a few more details on what I'm trying.
I've got the dev of date/calendar/views/cck all running at this point. I'm up to date on drupal core. (just as background info).
What I'm doing is this, each user within my system has 2 calendars. A corporate one and a personal one. These technically appear at user/%/billable and user/%/calendar. Now if I visit either of these pages, no problem. However I've have embedded each of these page views in a block to put on user/%. I have tried this two ways.
print date_embed_view('personal_calendar', 'calendar_1', array('block_identifier' => 'mini'), array(arg(1), arg(3)));However, the pager is doing this:
user/1?mini=user/1/calendar/2009-04
so I tried this as well:
$mini = explode('/', $_GET['mini']);print date_embed_view('billing_calendar', 'calendar_1', array('block_identifier' => 'mini'), array($mini[1], $mini[3]));
In either case when I click "next" I'm presented with a "Page not found" error. (which is different than what WAS happening before the upgrade)
I appreciate the help on this.
(also, as a side note, when I upgraded to 2.0 final yesterday, calendar stopped displaying any dates whatsoever. The nodes and dates all appear to be intact still, but they aren't displaying on calendar. I just wanted to make this known too but it's probably a separate issue)
Thanks, let me know what you want next? I've attached one of the calendars and it's corresponding content type. Both calendars are cloned off of each other so they are very minimally different.
Eclipse
#4
The disappearing values may be a formatter issue that I've seen a couple places now. Try to edit those date fields in the view and re-save the formats and the view itself to see if that helps. You may also need to go into the date field edit screen and go to the Display fields tab and re-save that page.
The pager issue I don't know, why are you using a pager with a calendar, or did I misunderstand?
#5
Oh, no, CALENDAR'S pager. i.e. year, month, day, week, prev, next. These are what I'm referring to. (sorry for the ambiguity).
will try for the disappearing dates thing, thanks!
#6
OK I found the problem. When you put the calendar into a block and use a view with an embedded argument, like 'user/1/calendar/2009-04' it wasn't figuring out where the arguments were. I just committed some changes to cvs to fix that.
Also you have some missing elements in your view -- you don't have the UID argument in the ical and upcoming events views and you had the node created date in a few places instead of the date you really want. I'm attaching an updated view. Check the permissions since they might have gotten screwed up since my system is set up differently than yours, but the rest should be OK.
#7
Hi KarenS,
i (think i) have the same issue with a drupal 6.10 site, but i don's want to update it to cvs head since it's a production site. i'm using the calendar block and whatever month i navigate to within the calendar block, the month title always links to the current, not the selected, month.
if it really is the same issue, do you have a patch file of the changes you did to fix this? i just surfed a bit through the ViewCVS interface, but i didn't find your commits...
thx in advance
stefan
#8
@7: This fix should be in 6.x-2.1. Probably you are safe to use 6.x-2.x-dev which has a couple of further fixes which might be useful.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
Hi..
in my case, the currently month is always the next month. For example: We´re in november, but the header shows "December". How could I fix that?