$nav_title gets incorrectly themed
in date_views/theme/theme.inc on lines 168 & 169:
$format_with_year = variable_get('date_views_' . $granularity . 'format_with_year', 'l, F j, Y');
$format_without_year = variable_get('date_views_' . $granularity . 'format_without_year', 'l, F j');
should be:
$format_with_year = variable_get('date_views_' . $granularity . '_format_with_year', 'l, F j, Y');
$format_without_year = variable_get('date_views_' . $granularity . '_format_without_year', 'l, F j');
note the extra "_" prefer on format, this allows it to read the correct variable name instead of always falling back on the default
Comments
Comment #1
nohup commentedThis fixes it. Thanks.
Comment #2
fmb commentedComment #3
peterx commentedWe need the same fix to change the month heading from
Monday, September 1toSeptember.We also had to uninstall and install the date module to make it install the new date format settings in date_views_install();
Comment #4
rudiedirkx commentedComment #5
rudiedirkx commentedPatch attached for solution in OP.
.
Another part of the bug is that the actual default for all
X_format_with_yearis "l, F j, Y", while in the UI config form, EVERY variable has a different format.My use case was with granularity "month". In the code (in
theme_date_nav_title()) defaults "l, F j, Y" (with year) and "l, F j" (without year) are used. In the config form on admin/config/regional/date-time/date-views the defaults were "F Y" and "F" resp., which are indeed right. Submitting the form fixed everything, but it's a horrible practice in a bad update.No patch for that. Not worth it for me.
Comment #7
cafuego commentedThis was fixed as part of #2294973: Date format in calendar title remains default (e.g., month view date shows as July 1, 2014) .