Hello,
I'm having a weird problem with panels arguments passed as a string context.
ctools-1.3
panels-3.3
I need to build a page which takes an optional date formatted string and passes it to a view pane powered by the Calendar module. I've build a panel page which takes 1 argument: /programs/!date where !date is my optional argument. Then, I configured the argument to be a string context since none of the other options were really fitting. Finally, I added the calendar view to the content lay-out and configured it to pass the panel argument to the view.
If I try one of these paths:
programs/blah
programs/1234567
programs/123456-7
The page will show up with my calendar loaded. Albeit not showing the correct date.
If I try to go for a date argument:
programs/05-04-2010
programs/05-2010
programs/2010
Drupal throws me a 404 page back. I can click on the 'edit panel' tab and it will take me to the correct panel page configuration page,
I'm puzzled. I know drupal's menu system considers everything behind the final / of a registered internal path as an argument. Even without being explicitly set through hook_menu() but that shouldn't cause any problems. Moreover, I don't have any url alias settings which would interfere with this specific set up.
I don't know whether or not this some kind of glitch, so rather then posting it in the issue queue, I'm hoping to find an answer to my problem here.
Comments
Found my problem
Okay,
I've found the problem.
My view contains a display of type 'content pane' which takes arguments and has a view style of 'calendar'. Exactly the same setup as with the default view which is created by the Calendar module.
The default Calendar view expects a path with an argument to be formatted like this:
calendar/2010-04-01
calendar/2010-05
calendar/2010
If I try something different, the view returns a 404 error.
If I'm going to build my own view with my own fields and let the Calendar module manage the calendar stuff, the view is going to play by the same rules. Same goes for views embedded in a panel page.
My argument should have been:
programs/2010-04-01
Of course, this is kind of behavior is confusing at best. Panels and views work fine. Calendar was the culprit. Anyway, I guess it's a good idea to keep this around as a not of this bit of weirdness. Might help some people!