Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Date View pager navigation for month based views advancing incorrectly.
Comment | File | Size | Author |
---|---|---|---|
#120 | Capture.PNG | 22.45 KB | Fool2 |
Comments
Comment #1
spiritcapsule CreditAttribution: spiritcapsule commentedRan into the same issue. Replicated issue on simplytest.me with Date 7.x-2.9-beta1 and default recommended versions of Core, Calendar, Views, and CTools.
Comment #2
dhalbert CreditAttribution: dhalbert commentedChanged title: also fails with non-Ajax navigation. The links in the Next and Prev buttons link to the current month.
The year view has the same problem as well.
Comment #3
bezu60 CreditAttribution: bezu60 commentedI'm having the same issue. And I don't even know what all of those attempted fixes mean. Is there a safe way to go back to a previous version? Will there be a patch?
And how do I revert back. I'm pretty green...any help appreciated.
Comment #4
dhalbert CreditAttribution: dhalbert commented@bezu60: You can git clone the Date repo, and checkout the 7.x-2.9-alpha2 version. But that requires some skills you'll have to learn, and is most easily done if you have command-line access to your site. There are tutorials - I'm sorry it's not so easy.
Comment #5
bezu60 CreditAttribution: bezu60 commentedI have no idea how to do that or time to learn it right now. Do you think there will be a patch?
Comment #6
bezu60 CreditAttribution: bezu60 commentedI was able to fix this easily by going back to the alpha version. You can find it here: https://www.drupal.org/node/2313405 Thanks to Vijay!!
I just deleted the Date Module and uploaded this one and everything is fine.
They should get rid of that beta release until it works properly.
Beth
Comment #7
Lostboy22 CreditAttribution: Lostboy22 commentedSee: patch for 2.9-beta1 https://www.drupal.org/node/2372073
Comment #8
bezu60 CreditAttribution: bezu60 commentedNevemind :)
Comment #9
kwfinken CreditAttribution: kwfinken commentedI am still seeing the issue on 7.x-2.9-beta2+1-dev. Any chance this patch is going to be rolled in soon?
You can see the issue at http://www.miala.org/calendar/month/2014-12/
Comment #10
Lostboy22 CreditAttribution: Lostboy22 commentedmoving to dev version, adding patch
This will also fixes https://www.drupal.org/node/2372073 Undefined variable: granularity line 283, 285 of date_views/includes/date_views_plugin_pager.inc
Comment #11
Lostboy22 CreditAttribution: Lostboy22 commentedComment #12
keva CreditAttribution: keva commentedpatch appears to fix this issue
Comment #13
gfury CreditAttribution: gfury commentedPatch worked for me (core 7.34, calendar 7.x-3.5, date 7.x-2.9-beta2)
Thanks !
Comment #14
rwilson0429 CreditAttribution: rwilson0429 commentedThanks Lostboy. The solutions you provided in #10 works for me. It also fixed the issue at https://www.drupal.org/node/2372073.
Comment #15
webadpro CreditAttribution: webadpro commentedPlease commit.
Comment #18
steinmb CreditAttribution: steinmb commentedPatch not longer apply and need to be re-rolled.
Comment #19
steinmb CreditAttribution: steinmb commentedHave a look at this commit:
Did this commit render this issue a duplicate? I think this issue need to be re-tested with and without this patch.
Comment #20
Jody LynnThe patch that went in half-way fixes it. But the issue remains that in March the next month is still being shown as May (because April has no 31st and the pager is still being calculated based on the end date)
See also #2422539: Date pager Prev Next links point to the same date on Calendar which is the same issue but a slightly different approach.
Comment #21
pwiniacki CreditAttribution: pwiniacki commented@Jody Lynn, I can confirm that, I have exactly the same issue.
Comment #22
steinmb CreditAttribution: steinmb commentedThanks for testing. The patch in #19 contain what did not get committed. Does this fix this issue? Have anyone tested it?
Comment #23
Lostboy22 CreditAttribution: Lostboy22 commentedLets try this patch. Only "Next" not working at this point.
Comment #24
my-family CreditAttribution: my-family commentedWhat should be tested? #19 with #23 together? Or #23 only?
#23 did not help, the "Next" link is still wrong.
#19 - pager points always to the same month
Comment #25
Lostboy22 CreditAttribution: Lostboy22 commented10 failed because fixing two issues at once. The granularity issue and the advancing issue.
19 "Next" cloned..previous_date, so date_modify +1 will point to current month, needed +2 for date modify
(will "hide" from summary)
23 trying a simpler approach, [may need to confirm $argument->max_date is always set]
my-family
just 23, try it on a clean copy of date-7.x-2.9-rc1.
Let me/us know the following if you still have problems.
Which version of PHP?
Are you using Calendar (what version?) or date pager for another view?
Are you using an account that "remembers" previous value?
Comment #26
Lostboy22 CreditAttribution: Lostboy22 commentedThe skip_empty_pages applies granularity when calculating the prev/next argument. We'll do the same when not skipping empty pages. Just the provided $argument->argument from views.
Comment #27
my-family CreditAttribution: my-family commentedOn the clean copy of date-7.x-2.9-rc1:
#23 did not help, #25 solved the problem.
@Lostboy22, thank you!
Comment #28
chiebert CreditAttribution: chiebert commented#26 Applies cleanly to date-7.x-2.x-dev (March 27 2015) as well as 7.x-2.9-rc1, and addresses the pager link issues for both month views when the month has 31 days, and the occasional week views.
Comment #29
zombree CreditAttribution: zombree commented#26 worked for me, using date 7.x-2.9-rc1+1-dev.
Comment #30
rwilson0429 CreditAttribution: rwilson0429 commented#26 worked perfectly well. I applied the patch in #26 to the latest 7.x-2.x-dev (2015-May-06).
Thank you very much Lostboy22.
Comment #31
DrIPA CreditAttribution: DrIPA commentedI applied the patch in #26 but now the week pager is broken when switching to week tab, for example: when on week/2015-W28 the next pager is also week/2015-W28, so I can not navigate to next week.
Date version: 7.x-2.9-rc1+2-dev
Calendar version: 7.x-3.5
Comment #32
misthero CreditAttribution: misthero commented26 works for months perfectly it was skipping September before patching
Comment #33
perlgal CreditAttribution: perlgal commentedI applied the patch #26 that fixed the month pager but like @e.ruiter reported, it broke the week pager.
Comment #34
steinmb CreditAttribution: steinmb as a volunteer commentedIf the week pager broke then, needs work
Comment #35
Anonymous (not verified) CreditAttribution: Anonymous commentedI tried using min_date when doing the next_date calculations and it has been working for me with the different granularity options.
Comment #36
RobertInOP CreditAttribution: RobertInOP commented#35 works for me in the months pager. Date version: 7.x-2.9-rc1 and Calendar version: 7.x-3.5
Comment #37
vikramy CreditAttribution: vikramy as a volunteer commented#35 works me too on 7.x-2.9-rc1 version. Thank you rsmylski
Comment #38
bezu60 CreditAttribution: bezu60 commented#35 worked for me. Thanks!
Comment #39
John Bickar CreditAttribution: John Bickar commentedComment #40
samstamport CreditAttribution: samstamport commentedI applied the patch in #35 to 7.x-2.9-rc1, but it does not work. Is there another patch I need in addition to #35?
When I go from Sept. 2015 it correctly advances to Oct. 2015, but when I click for Nov. it skips to Dec.
Please help.
Comment #41
steinmb CreditAttribution: steinmb as a volunteer commented@perstam the patch have to be applied to 7.x-2.x-dev
Comment #42
samstamport CreditAttribution: samstamport commentedOK.
I'm using the Open Outreach distribution. I'll create a problem report there since updating the Date module has so many dependencies.
Comment #44
Vali Hutchison CreditAttribution: Vali Hutchison commentedApplied Patch in #35 to Date 7.x-2.9 and fixed next skipping a month.
Comment #45
pivica CreditAttribution: pivica commentedApplied patch from #35 and this also fixed skipping next skipping a month.
Comment #47
rgchi CreditAttribution: rgchi commentedWill this patch be included in a release soon?
Comment #48
Rob_Feature CreditAttribution: Rob_Feature commented#35 works for me as well....
Comment #49
joelstein CreditAttribution: joelstein commented#35 works for me. Thanks!
Comment #50
mxhI can confirm that patch from #35 fixed this problem with current version 7.x-2.9. Don't know if this works with current dev though. Maybe can someone test it out with dev, so we can mark this as RTBC.
Many thanks to rsmylski (again), I appreciate your contributions a lot.
Comment #51
nikathoneadding another related issue which has a different patch may.
Comment #52
samstamport CreditAttribution: samstamport commentedI am using the Open Outreach distribution. They have incorporated this patch into their latest release. It works!
Comment #53
Jelle_SUploading my patch from #2580809-3: Pager returns 2 months later in month view here as well since it was marked as duplicate.
Comment #54
Anonymous (not verified) CreditAttribution: Anonymous commented@Jelle_S
Thanks for your patch, it essentially does the same thing as my patch. However, with my patch, there doesn't need to be any added checks or conversions. By using $argument->min_date, you get a date that is at the first of the month, and the beginning of any time frame to make the date math work.
Marking back as RTBC with the patch from #35
Comment #55
dobe CreditAttribution: dobe as a volunteer commented+1 to RTBC patch #35 once I investigated I solved the issue with the same code. But this issue queue already existed!
Comment #56
dasginganinja+1 to RTBC patch #35
This just fixed my calendar paging issue.
Comment #57
cudevdev CreditAttribution: cudevdev commented+1 to RTBC patch #35.
Comment #58
andrewtf CreditAttribution: andrewtf commented+1 to RTBC patch #35!
Comment #59
Alperian CreditAttribution: Alperian commented#26 worked for me. #35 didn't do anything
Comment #60
phandolin CreditAttribution: phandolin commentedThank you! The patch from #35 worked for us as well. +1 to RTBC
Comment #61
lias CreditAttribution: lias commentedPatched current dev version (100515) of date with #35 using Drupal 7.41 and fixed skipping month issue
Comment #62
chandraswami CreditAttribution: chandraswami commented[2015-10-31]
#35 did the trick!
Using Core-7.41, Calendar-7.x-3.5, Date-7.x-2.9.
I used patch in #35 and it fixed the Pager-{time-period}-Skipping issue for the Month, Week, Day and Year. This should get rolled into the Date_Module soon.
Hats off to rsmylski.
Comment #63
dstorozhuk#35 did the trick for me also, but:
by @danwonac in #2393191: Next month pager skipping months
.
It would be great if someone who contributed this lines
$this->view->date_info->next_date = clone($argument->min_date);
(284) tosites/all/modules/contrib/date/date_views/includes/date_views_plugin_pager.inc
can clarify if we can usemin_date
here.Comment #64
travelerttPatch #35 works for me as well.
Comment #65
dasginganinja@podarok What needs to be done about getting this live? I've started a new website and have again had to patch date module. Mind you this is all done with a Drush Makefile so it's automated, however with the recent date release it would be great to see this get updated. All we want is one cherry-picked patch :)
Comment #66
jbabiak CreditAttribution: jbabiak at OpenConcept Consulting Inc. commentedPatch #35 work for me, lets get this committed.
Comment #67
aderama CreditAttribution: aderama commentedPatch #35 worked for me too. I could not see any negative effect on it.
Comment #68
.bert CreditAttribution: .bert commentedPatch #35 works for me too. Thanks @rsmylski
Comment #69
BBCPatch #35 fixed this for me as well. Please commit.
Comment #70
tsokura CreditAttribution: tsokura commentedPatch in #35 worked for me too, with core 7.41, Calendar-7.x-3.5, and Date-7.x-2.9.
Comment #71
Kathode CreditAttribution: Kathode commentedWhen using core 7.41, Date-7.x-2.9, & Calendar-7.x-3.5, a calendar view that is displayed on a Smartphone browsing with Firefox or Safari has a problem with the Next month pager skipping months. When navigating from February to March, it skips a month and displays April. Desktop usage doesn't seem to have this issue. I've not applied patch #35.
Comment #73
cafuego CreditAttribution: cafuego at Creative Contingencies commentedPatch #35 committed, thanks everyone!
Comment #74
joelstein CreditAttribution: joelstein commentedThanks!
Comment #75
mahesha-gg CreditAttribution: mahesha-gg commentedI am experiencing the same issue using Views 7.x-3.13, Date 7.x-2.9, with Calendar 7.x-3.5. Will this patch work? Where/how do I apply it? Thanks.Got it! Thanks.
Comment #77
josaku CreditAttribution: josaku commented#53 works for me with Date 7.x-2.9.
#35 may not work for me (haven't checked though) since min_date and max_date are the same (why?) in our system.
Comment #78
Nik3D CreditAttribution: Nik3D commentedPatch #35 did the trick. Thanks!
Comment #79
Q2U CreditAttribution: Q2U commented#35 resolved my pager issue. Thanks!
Comment #80
SeanA CreditAttribution: SeanA commentedComment #81
steenyweeny CreditAttribution: steenyweeny commented+1 to RTBC patch #35
Comment #82
caillou CreditAttribution: caillou commentedPatch #35 work for me. Thanks!
Comment #83
Stephen Ollman#53 resolved the extra month jump for me.
Comment #84
tcfunk CreditAttribution: tcfunk commentedSo is this going to see an actual release?
Comment #85
Stephen OllmanWhilst patch #53 worked on one site, a week later it no longer worked.
Had to amend this line:
with
to get it to work again.
Test all months forwards and backwards.
Comment #86
Toby Wild CreditAttribution: Toby Wild at OPC IT commented(Ooops, double post, I work with Stephen who posted the same above, so I will limit mine)
Hi guys,
I don't entirely know why, but patch #53 didn't work for us.
This patch caused the 'Next' button in the Month view to stop moving forward.
'Previous' would work fine, but 'Next' would not advance the month.
Through sheer randomness, I tried adding a +1 day to the patch, and now it's working.
And now it's working.
The site was a D6 migrated site, so it's not a best case scenario, but just in case anyone else comes across this issue.
Comment #87
oscaralPatch #35 worked for me also. Thanks :)
Comment #88
runnergirl CreditAttribution: runnergirl commentedPatch #35 worked for me. I was going from Date module version 7.x-2.8 to version 7.x-2.9. I'm using Calendar version 7.x-3.5. The calendar NEXT button was skipping a month in version 7.x-2.9 whereas it didn't in version 7.x-2.8. Once I applied the patch in #35, it worked correctly.
Thank you rsmylski for offering this fix, it's greatly appreciated.
Comment #89
bcobb10b CreditAttribution: bcobb10b as a volunteer commented#35 worked for me in Date version 7.x-2.9. Kudos to all for the good research, and to rsmylski for the patch.
Comment #90
AswathyAjish CreditAttribution: AswathyAjish commentedThanks for the patch (#35). It worked fine for me.
My Calendar version is 7.x-3.4 and version of Date Views is 7.x-2.9.
Comment #91
dandaman CreditAttribution: dandaman commentedThanks! I upgraded to Date 7.x-2.10-beta1 and it fixed the issue.
Comment #92
RichardBeacham CreditAttribution: RichardBeacham commented#35 worked for me.
Comment #93
dbt102 CreditAttribution: dbt102 commentedI'm having this same issue with Drupal 8. I've checked it on D8.0.5, D8.1.x-dev and D8.2.x-dev.
Is this the right place to report the issue? Or should I create a new one in core and reference back to this?
Comment #94
cafuego CreditAttribution: cafuego at Creative Contingencies commented@dbt102: Date is part of Drupal 8 core, so you should (as you say) open an issue against date.module on the drupal project, then reference this issue.
Comment #95
RivkiTzipory CreditAttribution: RivkiTzipory commented#35 Work for me!
Comment #96
joshuautley CreditAttribution: joshuautley commented#35 worked for me
Comment #97
GiorgosK#35 has been committed some time ago, no need for patch
Installing the latest rc1 version worked for me
chose 1.
Comment #98
thalemn CreditAttribution: thalemn commentedInstalling the latest rc1 version also worked for me. Thanks!
League of MN Calendar
Comment #99
pslcbs CreditAttribution: pslcbs commented#35 worked on 7.x.2.9. Thanks!!
Comment #100
eXMarty CreditAttribution: eXMarty as a volunteer commentedAlso, I solved this problem by installing a module Date version 7.x-2.x-dev (2016-06-05)
Comment #101
Tamanda CreditAttribution: Tamanda commented#35 worked for me too! However, I also had to modify the settings for the pager from "format: CLEAN Urls" to "Format: pager". I think it was a problem regarding the url rewriting when the urls are made human friendly.
Comment #102
Biswajit Roy CreditAttribution: Biswajit Roy commentedThanks "rsmylski" for the solution.
Solution #35 has worked for me too.
Thanks.
B. Roy
Comment #103
tactica_ryan CreditAttribution: tactica_ryan commented#35 worked for me. Thanks rsmylski!
Comment #104
jlashomb CreditAttribution: jlashomb commented#35 worked for me as well for 7.x-2.9
Thanks!
Comment #105
dandaman CreditAttribution: dandaman commentedJust to reiterate: This patch has already been committed to 7.x-2.10-rc1 and 7.x-2.x-dev, so I recommend just updating to one of those if you are experiencing this issue. No "#35 worked for me" posts are needed to confirm this should be committed as it is already committed, just not yet in the main release. To get the 7.x-2.10-rc1 release, click on "View All Releases". Then this fixes the above issue and you can also test other fixes before 7.x-2.10 is released. Thanks!
Comment #106
orizonmedia CreditAttribution: orizonmedia commented(The pb is that the calendar skip some month on next button) I am running date 7.x-2.9 and was not able to rollback to dev or beta version cause date is used everywhere in many field and site is already in production... I just taken the line to change in the date_views_plugin_page.inc (changing max to min in line 284) and it works fine!!!! It save my life thank you very much.
Comment #107
borjaevo CreditAttribution: borjaevo commented#106 solved my problem
Comment #108
darksnow CreditAttribution: darksnow commentedFix in #106, essentially manually applying the patch in #35 worked for me too.
Doesn't seem to be any implications to this either.
Comment #109
Haretuerk CreditAttribution: Haretuerk commented#106 worked for me. Thanks!
Comment #110
ldwyer CreditAttribution: ldwyer as a volunteer commented#106 also worked for me. I am using Date 7.x-2.9 and Calendar 7.x-3.5 (Drupal 7.5). Thanks!
Comment #111
kwendling CreditAttribution: kwendling commented#106 also worked for me also. Thank you.
Comment #112
dbourrion CreditAttribution: dbourrion commented#106 works for me - many many thanks, we were stuck with that.
Comment #113
nikky171091 CreditAttribution: nikky171091 at Kellton Tech Solutions Ltd commented#35 worked for me. Thanks!
Comment #114
miniwebs2 CreditAttribution: miniwebs2 commented#106 worked for me - thank you.
Comment #115
pal_ur CreditAttribution: pal_ur as a volunteer commented#106 worked for me to. Thank you!
Comment #116
twood CreditAttribution: twood commented#106 works. Very simple. Just made 3 sites complete. Thank you.
Comment #117
jlovato CreditAttribution: jlovato commented#106 worked for me. @orizonmedia thanks for the explanation of what line to change.
Comment #118
EgbertB CreditAttribution: EgbertB commentedhttps://www.drupal.org/project/date
Update to dat 7.x-2.x-dev or higer
Comment #119
arv.drupal CreditAttribution: arv.drupal commentedHad the similar issue. Updated to date 7.x-2.x-dev and it worked fine. Thanks
Comment #120
Fool2 CreditAttribution: Fool2 commentedI am just putting this here in case someone else runs into this issue-- something caused my contextual filter to get out of sorts, and I thought it was caused by this issue. Updating to dev didn't help so I looked around more-- make sure that your "Month" view page has a granularity of "month" in the contextual filter. Mine was somehow set to "day" and it gave very weird results that mimic the symptoms in this issue thread.
Comment #121
rubenvarela CreditAttribution: rubenvarela commentedIf anyone's checking on this - Patch on #35 got merged in here,
First tag it appeared on is
7.x-2.10-beta1
then finally released on7.x-2.10
on 7 April 2017 — https://www.drupal.org/project/date/releases/7.x-2.10Comment #122
webservant316 CreditAttribution: webservant316 commented+1 for #35. Why is this not committed?
Comment #123
dandaman CreditAttribution: dandaman commentedwebservant316, please see the comment above yours, #121. It was committed over 3 years ago and released in 7.x-2.10 over two years ago. Make sure you are using the latest recommended version and not an old version on your site.
Also, see the comment above that about someone else who thought it was this code issue but it was instead some configuration. If you're running a newer version or dev version, maybe this no longer works again, so if that is the case, maybe look in the code to see what may have since then to break it.
I hope this information helps you debug the issue.
Comment #124
webservant316 CreditAttribution: webservant316 commentedOh yeah, thanks for pointing that out. I am using 2.9 and was waiting for 2.11 because of this issue https://www.drupal.org/node/2873415. When 2.11 comes out I will drop the patch above.