Closed (fixed)
Project:
Date
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Jun 2014 at 09:56 UTC
Updated:
10 Sep 2015 at 20:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
keesje commentedComment #2
keesje commentedComment #3
micahw156Marked #2296669: Month & Year display 1st of Month in title/header, not just Month as duplicate of this issue.
Comment #4
micahw156I concur, this patch solves the problem with date views not getting the correct title.
Comment #5
silurius commentedI applied the above patch to date-7.x-2.x-dev (2014-Jul-29), cleared caches and the issue remains.
Comment #7
micahw156Rerolled keesje's original patch with correct file paths.
Comment #8
micahw156@silurius:
Are you sure the patch applied cleanly? Can you re-test with the new patch?
Also, the original #355058: Hardcoded day/month/week output format for theme_date_nav_title() patch added a new admin/config/regional/date-time/date-views admin form, but it did not contain an update script to populate default values where date_views was already installed. Try opening that form and saving (so the default values actually get stored in the variables table) before you test again.
Comment #9
silurius commentedThat last step (re-saving Date and time) did the trick. Thank you so much! I was really pulling my hair out over this one.
Comment #10
vijaycs85Thanks for the patch and testing. Looks good to me.
Comment #11
dhalbert commentedI updated to the latest Date 7.x-2.x, applied the #7 patch, and I still saw "July 1, 2014" in the month view. I tried going to
admin/config/regional/date-time/date-viewsas mentioned in #8, but strangely I get "You are not authorized to access that page", even though I'm logged in as AdministratorComment #12
dhalbert commentedI fixed this manually to get around the authorization problem I had in #2294973-11: Date format in calendar title remains default (e.g., month view date shows as July 1, 2014) (which I still have).
date_views.installsets some variables, but did not get run on update. I did the equivalent of that code from drush:Comment #13
bezu60 commentedCan anyone instruct a less technical site manager on how to fix this. I don't use drush and I don't know how to apply the patch. Very frustrated! Will there be an update eventually that fixes this issue?
Comment #14
lias commentedI also have this issue after the security update. The #7 patch fixed it.
@bezu60 - I've attached patched theme.inc file - change extension .txt to .inc
Comment #15
Immansophia commentedI have created an issue separately at https://www.drupal.org/node/2313269. Sorry about that, I am not a regular user at Drupal.org.
Comment #16
Immansophia commentedIsabug, I tried updating the theme.inc file, but to no avail. The issue still remains. Anyone, please help!
Comment #17
bezu60 commented@isabug - I don't know how to apply this. Do I simply replace the file in CPanel?
Comment #18
bezu60 commentedIs this the file to replace?
public_html/sites/all/modules/date/date_views/theme
Comment #19
Immansophia commentedAuthor of the Date Module: Please review the conversation thread and post updates.
Comment #20
micahw156Quick workaround for people unable to apply the patch:
STEP 1: Edit date_views/theme/theme.inc and go find line 165.
Change these two lines:
To these two lines:
Note: the only difference is one underscore character added to each line.
Upload the changed file back to your web server.
STEP 2: Go to (YOUR_WEBSITE)/admin/config/regional/date-time/date-views and click Save. If you get permissions errors, try clearing caches.
Comment #22
vijaycs85Thanks all. Created 2.9-alpha1 with this fix.
Comment #23
Immansophia commentedvijaycs85: Is there a link to this fix? I am not able to find it in the Drupal site.
Comment #24
bezu60 commentedI think it will be up shortly and if you wait a few hours it will hopefully appear as an automatic recommended update. I'm just happy I don't have to deal with a patch!
Comment #25
vijaycs85Please check https://www.drupal.org/node/2313405
Comment #26
silurius commentedStrangely, 7.x-2.8 (as of this morning) doesn't appear to have received this patch, and yet after upgrading to it without patching it, my titles are still correct (month only). Maybe clicking save on /admin/config/regional/date-time/date-views alone is a good enough fix in some cases?
Comment #27
bezu60 commented@silirius... I don't think so...did not work for me.
Comment #28
vijaycs85Just FYI, As per https://www.drupal.org/node/128614 I made an alpha release (7.x-2.9-alpha1). So it won't be appear in Date module home page (or on your site's update page) until next major release (i.e. 7.x-2.9). Need to manually update, if you want this fix immediately.
Comment #29
bezu60 commentedI just did it and it worked perfectly! Thanks Vijaya! And don't forget everyone...after you install the updated module you need to go to /admin/config/regional/date-time/date-views and "Save". You don't have to change anything... just click save.
Comment #30
Anonymous (not verified) commentedNote: those people experiencing permission issues accessing /admin/config/regional/date-time/date-views might need to apply the patch from #2313587: Incorrect permission name.
Comment #31
dhalbert commentedClarified issue title - getting a number of duplicates.
Comment #32
Immansophia commentedHello Vijaycs85, the alpha release also did not work for me. I am still seeing the day name, date, month and year. Somehow this bug remains. Any thoughts?
Comment #33
Immansophia commentedHello All, it worked. Actually I was updating the incorrect date settings. Thanks to vijaycs85 for this patch and to all who provided valuable input.
Comment #34
pjbarry21 commentedLatest dev (dated July 31) worked for me, too. I did run update.php (and I don't have any CSS/javascript aggregation set, yet as these are brand new site installations -- so I didn't need to clear any of the caches as an additional step -- but maybe update.php does that as part of its process). I had already hit save (in #29) BEFORE installing this latest dev (it was something I tried before I started my search for a fix) -- it didn't fix my issue with 7.28, but as soon as I installed the latest dev (dated July 31), everything looked perfect.
Comment #35
Gib... commentedHi,
I confirm that to fix this problem I had to :
'access arguments' => array('administer site configuration '), removing the space after "configuration"
Thanks all.
Comment #36
ryanoreilly commentedConfirming #7 applied to 7.x-2.8 also fixed the issue for me. My "page by date" title was also displaying incorrectly.
Comment #37
Miao1994 commented#20 works perfectly for me. Drupal 7.30, Date 7.x-2.8.
Thanks
Comment #38
DebMorris commented#20 fixed the issue for me as well (Drupal 7.31, Date 7.x-2.8)
Comment #39
hwasem commentedI applied the patch in #7 and cleared caches. I was finally able to see the page at /admin/config/regional/date-time/date-views. I saved it and the month/year was showing correctly on my monthly calendar again.
Comment #40
savingstrangers commentedComment #20 resolved this issue for me, thank you!
Comment #41
hass commentedIs this the ONLY change that exists between 2.8 and in 2.9-alpha1?
Comment #42
susoson commentedComment #20 hack worked for me as well.
Core 7.31 Calendar 7.x-3.4 Date 7.x-2.8
Comment #43
_Arjan_ commented#20 works just fine. It's a simple solution, should be fixed in the next release.
Comment #44
bneil commentedI've submitted an issue and patch to add an update hook in #2332181: Add update hook for date_views variables which sets the variables so you don't have to go and save the form manually.
Comment #45
rbrownell#20 Worked for me. Thanks for posting this!
Comment #46
miniwebs2 commented#20 worked for me also - thankyou!
Comment #47
tzt20 commented@vijaycs85 Any chance that you could add the permission name fix to 2.9 alpha as well (https://www.drupal.org/node/2313587)? It's been applied to 7.x-2.x, but that code isn't quite ready for use yet (https://www.drupal.org/node/1075880). I'm also getting access denied as an administrator when trying to visit /admin/config/regional/date-time/date-views.
Comment #48
vijaycs85@tracyt10, sure we can have another alpha release with current fixes.
Comment #49
tzt20 commentedThanks vijaycs85! I look forward to the release!
Comment #50
vijaycs857.x-2.9-alpha2 is out - Checkout https://www.drupal.org/node/2344525
Comment #51
bigdogsam commentedThanks for all you do, alpha2 worked like a champ!
Great job
Comment #52
enzo de simone commentedFor me it doesn't work
Comment #54
PascalAnimateur commentedThe patch from #7 works like a charm, but I think the mini calendar should include the year in its title (F Y).
Here's a patch that fixes this.
Comment #55
enzo de simone commentedIt's work. Thanks
Comment #56
sebaz commentedIt's not fixed. It should be reworked. Last update (at 2014-Nov-02) hides Date Views tab and implements 3 bugs in code.
Can someone make this changes as one patch?
File: date_views/date_views.module
File: date_views/theme/theme.inc this is patch #1
Comment #57
sebaz commentedComment #58
schifazl commentedI hadn't time to create a patch with SebaZ suggestions, but I can confirm that #56 works
Comment #59
BlaF commentedBugs found by SebaZ are already fixed in git repository:
- missing underscores in format_with/without_year was pushed July 31st by vijaycs85 (commit aff5e58 for this issue, see #21)
- typo in format arguments was fixed September 16th by bwpanda with commit 784680a for issue #2313587
7.x-2.9-alpha2 has both fixes.
Comment #60
drupalerocant commentedI tried 7.x-2.9-alpha2 and it didn't work for me.
Also 7.x-2.9-beta1 same problem.
I checked that bugs found by SebaZ are already fixed as BlaF said.
Any help on what is happening??
i am using drupal 7.33 in case it is related.
Thanks!
Comment #61
Lostboy22 commentedYour still must go to: admin/config/regional/date-time/date-views
(Administration»Configuration»Regional and language»Date and time Date-View tab)
and click "Save Changes" even if you don't change anything.
Comment #62
drupalerocant commentedThank you very much Lostboy!
It finally worked in two of my websites!
Comment #63
jasonkryst commentedI can also confirm that the response within comments #59 and #61 fix the issue at hand. It would be nice if we could have the settings auto-applied, skipping #61.
Any thoughts?
Comment #64
davidkp commentedAwesome... #56 and #61 did the trick. Thanks!
Comment #65
didier misson commented#56 and #61 did the trick for the Month view.
But not ok for the week vue.
In French : "Semaine du Décembre 1, 2014" : not correct.
It must be "Semaine du 1 Décembre 2014"
I hope it will be corrected in the next "date" update.
Thanks.
Comment #66
BlaF commented@Didier Misson, no need to wait for the next date update: in admin/config/regional/date-time/date-views, set "Date views week format with year" to "j F Y" and "Date views week format without year" to "j F" and the date will use French date format.
Comment #67
didier misson commented@BlaF : ok, I will make this.
You are right : no need to wait the next date update
;-)
Thanks.
Comment #68
mprell commentedDoes anybody have an alternative solution to patching or directly editing theme.inc? For various reasons, this is not an option.
Comment #69
michelleI just updated to 7.x-2.9-beta2 and it fixed the problem for me. Going to leave the status alone but, if someone else can confirm, this seems to be fixed.
Edit: While it fixed the problem, now the paging arrows on either side of the month no longer work so beware if you are updating to fix this problem.
Edit #2: This patch fixes that problem: https://www.drupal.org/node/2372073#comment-9337149
Comment #70
ladybug_3777 commentedPer request here is a patch file (for date version 2.8) that does what is in #56. After applying be sure to follow the instructions on #61.
NOTE!!!!: This patch will likely fail simple test because it is not written against the dev version (which this issue is filed against), but it does work as expected with the current 2.8 version and will get you through until the new date version is released. Plus it will keep you from having to manually apply the changes and it also makes rollback a lot easier.
Comment #71
happysnowmantech commented@ladybug_3777: Thank you, your patch in #70 worked for me!
Comment #72
akalata commentedComment #75
ladybug_3777 commented^^ As suspected my patch did fail simple test, but that is because these changes already exist in the dev version of the module. The patch itself is still OK to use on version 2.8
Comment #76
hass commentedComment #77
leistiko_texvet commentedFWIW: I manually updated to 7.x-2.x-dev tar.gz (posted 2014-Dec-07) and it resolved the situation for me. It's worth noting that the title of my calendar instances just shows the month now, but that's better than erroneously showing the date as the first of the current month. Future readers who are confused about how to manually update should check out https://www.drupal.org/node/250790#replace
Comment #78
Keith Caulkins commentedUpgrading to 7.x-2.x-dev worked for me as well. I did have to go to admin/config/regional/date-time/date-views however, and click save.
Comment #79
Jen7 commented#56 worked for me. Many, many thank yous, SebaZ.
Comment #80
Funksmaname commentedThis is still an issue - update to 7.x-2.x-dev fixed it.
Comment #81
tajindersingh commented#56 worked and correct solution.
Comment #84
sirian commented#56 WORKED FOR ME, together with #61
Thank you Sebaz and Lostboy22
Comment #85
idea_vasil commentedTnx @micahw156 #20 worked for me too
Comment #86
.bert commentedThanks @ladybug_3777
Patch in #70 works great on v2.8 if you need to get by until the next stable version.
Comment #87
PascalAnimateur commentedIs it possible to make the date_views settings multilingual through the use of i18n_variable? This would allow specific date_views formats for different languages instead of unique, global settings.
Comment #88
pcrats33 commentedComment #20 is on key. I just patched Date 2.8 because it needed an extra underscore:
date/date_views/theme/theme.inc
The emphasis is on the change from ... $granularity . 'format_with_year ...
To this: ... $granularity . '_format_with_year ...
Also in date_views.install, these drupal variables are set. If you never installed date and just upgraded from a previous version, you may need to set all these variables again. You can either reinstall the date module, or just set the variables some other way programmatically one time.
Now my calendar is showing February in the title, not Sunday, February 1!
Comment #89
katannshaw commentedThe workaround provided on #20 worked great for me. Thanks micahw156! However I did start getting these warnings in my logs afterwards when users visit a simple view for our news page that displays an unformatted list of 10 teasers per page:
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of sites\all\modules\date\date_api\date_api.module).
Could they be related? Has anyone else noticed this issue?
Comment #90
liquidcms commentednot sure why this is marked as closed as i don't think it is fixed in any stable release, is it?
i had 2.9-beta but it didn't work for other reasons and i see not listed on project page anymore; so reverted to 2.8 (odd thing is the changes from #70 appear to be in place already). i go to format config page and save.
problem persists.
Comment #91
ladybug_3777 commentedIt is not fixed in a stable release, it's fixed in the dev version. If you want to fix your current stable release you can use the patch provided in #70.
Comment #92
debain commentedYou can use the _init hook in your module:
Comment #93
katannshaw commented@ladybug_3777: Patch #70 worked for me as well. Thanks! However I immediately started seeing these new php warnings in my logs each time an unrelated view gets loaded:
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of sites\all\modules\date\date_api\date_api.module).Which references this line:
return parent::format($force ? $format : date_limit_format($format, $this->granularity));
of
Do you think that it could be related to the patch? Do you have any suggestions?
Comment #94
ladybug_3777 commentedjayhawkfan75, after applying the patch did you also do this part:
Your still must go to: admin/config/regional/date-time/date-views
(Administration»Configuration»Regional and language»Date and time Date-View tab)
and click "Save Changes" even if you don't change anything.
If not that's probably all that's wrong.
Comment #95
katannshaw commentedYes I did do that step and I cleared the cache as well. It did fix the original issue and then I started seeing those warnings in the logs. It could be unrelated (especially since no one else has reported it), but I thought that the timing was interesting. The warnings don't crash the site, but they do appear four times each time the view is loaded.
Comment #96
veverita commentedI applied #20 to the file found in panopoly-7.x-1.19 and it fixed the problem.
Thanks
Comment #97
katannshaw commented@ladybug_3777: Another user created an issue report Error with DateTime::format() for these warnings that I'm now receiving, so I'll continue there. Thanks for your help.
Comment #98
maletruv commented#56 worked for me. Thanks
Comment #99
pgdagenais commentedIs it possible for me to do #61 in a multi-site installation with drush ?
Edit: Updated to 2.9-rc1 and I don't have this problem anymore.
Comment #100
jackalope commentedThanks for the patch in #70, @ladybug_3777! Works well for me.
Comment #103
Steve -cc commentedHaving this problem on installation using 7.x-2.8. Went to apply patch at #56 but cant find the two files - date_views/date_views.module
and
date_views/theme/theme.inc to do them manually
Do these patches apply to 7.x-2.8?
If so can someone point me to where the files should be?
Thanks
Steve
Comment #104
Steve -cc commentedComment #105
katannshaw commented@Steve -cc: They should be located at:
sites/all/modules/date/date_views/date_views.module
sites/all/modules/date/date_views/date_views/theme/theme.inc
Do you not see them there?
Comment #106
Steve -cc commentedNo - not there sub directories run from date to date-tools, then help. No date_views in the directory.
Comment #107
katannshaw commentedHmm, that's strange. I'm not sure why you don't have those in your install, so you'll want to try a clean install of 7.x-2.8 with all of its sub-directories including date_views and go from there.
Comment #108
Steve -cc commentedThanks for the feedback. The installation was missing the directory. Reinstalled - added the patches at #56 - re saved config as in #61. Fixed
Comment #109
Steve -cc commentedComment #110
katannshaw commented@Steve -cc: That's great news. Glad to help.
Comment #111
cdmo commented#20 worked for me. Just a couple underscores missing. Seems like this should be able to be patched into the production branch, without too much trouble right?
Comment #112
ladybug_3777 commented@cdmo there is a patch at comment #70 (created from the manual patch instructions from item #56) that you can apply to version 2.8 if needed.
Comment #113
cdmo commentedThanks @ladybug_3777. I did have the fix in place, I was just wondering why it couldn't be committed to the production branch of the module.
And... now I see that the missing underscores have been added in the latest version of Date, version 2.9, which was rolled out a couple days ago. Looks like my petty griping occurred only a short time after the fix was released :) Thanks to all who maintain the Date suite of modules!
Comment #114
klidifia commentedSolution: update the date module. Works in 2.9.