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.
Problem/Motivation
The config is set to F Y
but should be Y m
as arg passed as, e.g. 201512
Proposed resolution
Supply patch to yaml file.
Remaining tasks
It seems for month that the argument replaces the "month" arg in path also, this does not happen for week, etc.
e.g. : VIEW_BASE_PATH/month/201512 gets passed as VIEW_BASE_PATH/201512 which is incorrect. Not sure where this happens in code at the moment...
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#4 | calendar-field_event_date-view.yml | 18.46 KB | mccrodp |
#4 | views-Contextual-filter-month-calendar.png | 89.44 KB | mccrodp |
#2 | calendar-fix-views-template-month-validation-2630188-2-d8.patch | 503 bytes | mccrodp |
Comments
Comment #2
mccrodp CreditAttribution: mccrodp as a volunteer commentedComment #3
tedbow@mccrodp actually the replacement_format in the validation options is a php date format for the substitution that is used for argument "title".
In places where you can use the argument in Replacement patterns the replacement_format will be used instead of the input. So you would see December 2015 instead of 201512. The templates are using this in the Header area to show the calendar header.
Comment #4
mccrodp CreditAttribution: mccrodp as a volunteer commented@tedbow - thanks, I reapplied the patch and it seems it is not working via the views path URL, so seems you are right. However for the event view attached, the Next & Previous links on Month display are providing URLs to "Page Not Found".
E.g: /calendar-field_event_date/201512 & /calendar-field_event_date/201601
Which I imagine should be:
/calendar-field_event_date/month/201512 & /calendar-field_event_date/month/201601
However, these links provide "Page Not Found" also on manually loading them. The args: "201601" do work through the "Update Preview" in the views UI though (which I thought they were not previously, hence the format related patch).
Comment #5
tedbow@mccrodp I am pretty sure I know what your "Page not Found" issue is.
In your yaml you have:
The default tab doesn't work excepting arguments now. I don't think this a Calendar issue but rather a Drupal core issue.
I found it a while ago but haven't have time to file a patch.
If you could confirm this on this issue that would be great #2630234: Fix Menu Tabs in Template Views
Details there
Comment #6
mccrodp CreditAttribution: mccrodp as a volunteer commentedThanks for the info @tedbow. I did some testing and updated the issue, it looks like a Calendar Pager issue specifically when dealing with "Default Tab", as Views core pager does not seem to have this issue, as I state in #2630234-3: Fix Menu Tabs in Template Views