I have an upcoming event list that has a number of repeating date events that happen every Monday, twice a month, etc.. Using the views module I have been able to format/output this list so the repeating dates show up in the right order, and only list the date for that particular instance. When I select the event to view a specific instance of the node with repeating dates there is a long list of every date related to that node.
I have edited the date field using "manage display" options to only show 1 value, but then each page for the repeating event only shows the first date instead of the particular instance I linked to from the previous views page. How can I make it so my node detail pages show a single date related to the specific instance in my repeating date set.
Any help is greatly appreciated. I've scoured the issue queue and forums without finding a solution.
Comment | File | Size | Author |
---|---|---|---|
#26 | calendar_repeating_event.png | 34.41 KB | chiebert |
#26 | repeating_event_node_view.png | 31.67 KB | chiebert |
#23 | Field-Date-Settings.png | 44.05 KB | tmckay |
#23 | Filter-DateStart-Settings.png | 50.78 KB | tmckay |
#23 | UpcomingBlock-Settings.png | 37.09 KB | tmckay |
Comments
Comment #1
Quadomated CreditAttribution: Quadomated commentedStill having problems with this issue, anyone have a solution?
Comment #2
KarenS CreditAttribution: KarenS commentedThis is not a major feature request, it is a support request. Make sure you are using the 'add delta' option, which is a setting on the date arguments and filters. That adds information to the view that Date needs to tell which date you are looking at.
Comment #3
Quadomated CreditAttribution: Quadomated commentedKaren, thanks for the response and all the hard work you do on this module and others. I'm not familiar with the 'add delta' nor do I know where to find/use it to impact how my nodes are displaying. As it is now my node for each reoccurring event is displaying date like:
Tuesday, November 15, 2011 - 6:00pm Thursday, November 17, 2011 - 6:00pm Tuesday, November 22, 2011 - 6:00pm Thursday, November 24, 2011 - 6:00pm Tuesday, November 29, 2011 - 6:00pm Thursday, December 1, 2011 - 6:00pm Tuesday, December 6, 2011 - 6:00pm Thursday, December 8, 2011 - 6:00pm Tuesday, December 13, 2011 - 6:00pm Thursday, December 15, 2011 - 6:00pm Tuesday, December 20, 2011 - 6:00pm Thursday, December 22, 2011 - 6:00pm Tuesday, December 27, 2011 - 6:00pm Thursday, December 29, 2011 - 6:00pm Tuesday, January 3, 2012 - 6:00pm Thursday, January 5, 2012 - 6:00pm Tuesday, January 10, 2012 - 6:00pm Thursday, January 12, 2012 - 6:00pm Tuesday, January 17, 2012 - 6:00pm Thursday, January 19, 2012 - 6:00pm Tuesday, January 24, 2012 - 6:00pm Thursday, January 26, 2012 - 6:00pm Tuesday, January 31, 2012 - 6:00pm Thursday, February 2, 2012 - 6:00pm Tuesday, February 7, 2012 - 6:00pm Thursday, February 9, 2012 - 6:00pm Tuesday, February 14, 2012 - 6:00pm Thursday, February 16, 2012 - 6:00pm Tuesday, February 21, 2012 - 6:00pm Thursday, February 23, 2012 - 6:00pm Tuesday, February 28, 2012 - 6:00pm Thursday, March 1, 2012 - 6:00pm Tuesday, March 6, 2012 - 6:00pm Thursday, March 8, 2012 - 6:00pm Tuesday, March 13, 2012 - 6:00pm Thursday, March 15, 2012 - 6:00pm
Thank you for your patience and helping figure this out
Comment #4
KarenS CreditAttribution: KarenS commentedLook for the following on the Date contextual filter:
Comment #6
pjcdawkins CreditAttribution: pjcdawkins commentedI haven't got this to work yet.
I have "Add multiple value identifier" enabled for each of the view's date filters (these are normal filters, not contextual filters). But that doesn't appear to make any difference to the view's query. The behaviour is as described in the OP.
Comment #7
Quadomated CreditAttribution: Quadomated commentedNo problems with the how my dates show up within views, only when I look at the node detail.
Within your views have you tried unchecking "Display all values in the same row" underneath the MULTIPLE FIELD SETTINGS. When I made that change my views displayed only the active instance date just as I'd like.
Comment #8
pjcdawkins CreditAttribution: pjcdawkins commentedMy view lists node teasers, not fields, so there are no multiple field settings (the node display has no settings in Views).
In this issue I suppose our problem is really in the Date field's display formatter, not in Views. What I want it to do is:
So a repeating event could show its next date when displayed on its own (with the Repeats tab still available), but when in a sorted View it would show the relevant date for each instance in the list.
Am I right that this doesn't seem to be possible at the moment with the Date module? If that's the case, I will see if I can implement the feature with a custom module (although I only work part time) as I guess it's an edge case.
Comment #9
KarenS CreditAttribution: KarenS commentedSee #1491172: Cannot just show one date repeat value that is not at start or end, which is a feature request.
Comment #10
chiebert CreditAttribution: chiebert commentedNot wanting to re-open this, but while trying to get the node view to display the 'current' instance of a repeating date, I discovered that the field display settings (admin/structure/types/manage/[event-type]/display), I can enter a relative date in the 'starting from' field of the 'Multiple values' section. So, I can tell it to show 1 item starting from 'now', and voila!
That said, the help text on that widget could use a tweak, since for the longest time I assumed I could only enter a hard-coded specific date in the from/to fields...
Comment #11
pjcdawkins CreditAttribution: pjcdawkins commented@chiebert (#10)
Thanks, that's very helpful to know.
I will want something quite a bit more flexible: my site has events that sometimes "repeat" just once, e.g. a show that's on for two nights, Wednesday and Thursday. For those I want to display both dates on the full node display, and hide the repeat rule (and ideally make both dates available to a customised Commerce field for selling tickets). Other events repeat every week for a whole year so obviously for those I don't want to show more than one date, but I do want to display the repeat rule.
I'd want to do something similar for events in the past, although setting 'starting from' to 'now' would not work for those.
AND where those event nodes are listed, the reference date shouldn't be 'now', it should be the date corresponding to the position in the list (i.e. the date of the previous result). But that would probably require something Views-ish.
Comment #12
sashken2 CreditAttribution: sashken2 commentedThanks chiebert
'now' - works good, but I need 'now -1 day' and it don't work
Comment #13
steven.wichers CreditAttribution: steven.wichers commentedUse "yesterday" or "-1 day"
Comment #14
sashken2 CreditAttribution: sashken2 commentedsteven.wichers, if I use "yesterday" or "-1 day" AND date = Today, I don't see date in Node view
P.S. if I use "yesterday" or "-1 day" I don't see date in Node view
Comment #15
steven.wichers CreditAttribution: steven.wichers commentedDoes the event occur within that time frame?
It sounds like you want this: "If the event has a time that occurs yesterday or today then show that time, but if it doesn't then show the next closest one."
If that is correct I do not think you are going to get what you're looking for without custom code.
Comment #16
kjauslin CreditAttribution: kjauslin commentedAfter losing quite some time researching on how to display the next available date (from today) in a views row, I finally found this issue and comment #1401688-10: How do I make the node view of a repeating date event only show the specific date of the instance I'm viewing.. Very cool feature. To save future time for others, I made a smallest patch to include the availability of relative dates in the GUI help text.
Comment #17
kjauslin CreditAttribution: kjauslin commentedComment #19
Tran CreditAttribution: Tran commentedIs there an answer to this?
I have a calendar that has repeating events... on day 1, there is one listing of the event. On day 30, there is 30 listings of the event.
What is the easy way to fix this so that a repeated event shows up ONLY ONCE per day it is scheduled
Comment #20
SchwebDesign CreditAttribution: SchwebDesign commentedHey all,
Try this patch here: Support relative date formats in the filter of the date field output formatter
That patch solved the issue for us, as "now" worked, but "yesterday", "1 day ago", "-1 day", etc didn't work at all.
I hope that helps someone else as well.
Comment #21
peteruithoven CreditAttribution: peteruithoven commentedThe suggestion in #7 works for me.
Comment #22
tzt20 CreditAttribution: tzt20 commentedThe suggestion in #7 works for me too. Thanks for posting.
Comment #23
tmckay CreditAttribution: tmckay commentedI'm having the same issue. I've tried pretty much everything in this post and anything else I've found. Nothing has worked for me yet. Take a look at the images I've attached to see how I have the block setup.
Delta makes sense, just set it equal to 0. Problem is delta doesn't update when it's gone past the date. I can't seem to find the fix. I need help.
Comment #24
pixelsweatshop CreditAttribution: pixelsweatshop commented@tmckay please don't change the issue title.
Comment #25
tmckay CreditAttribution: tmckay commentedOh sorry. I didn't know that did that. First time commenting. Thought those were required for my comment for some reason. Well if anyone could help I'd appreciate it. Still having issues.
Comment #26
chiebert CreditAttribution: chiebert commentedJust chiming back in here - Just to make sure I hadn't introduced any wonky settings along the way, I started from scratch with a fresh D7.21 site, Date 7.x-2.6 and Calendar 7.x-3.4:
Result: When I view, for example, the month display for the calendar, and then click on some instance of a repeating event, the node view show all the repeat dates. So, I'm not seeing where the 'add multiple value identifier' is taking effect. Is there yet more that I'm missing here?
(Meanwhile, I've found that the Date Repeat Formatter sandbox project - http://drupal.org/sandbox/othermachines/1456552 - is doing the trick for now)
Comment #27
lias CreditAttribution: lias commentedI'm using the Date Repeat Formatter module now on a production site and it's working really well so far using the current dev release of Date.
See the issue here to download the zipped version of the module.
http://drupal.org/node/1509984#comment-7374284
Comment #28
cybernomad CreditAttribution: cybernomad commented@Chiebert #10: Cool, that is exactly what I was looking for, works also with fields in views
Comment #29
shortspoken CreditAttribution: shortspoken commentedWanted to drop a solution here as I came across the same issue. I ended up using the sandbox module "Date Repeat Entity" https://drupal.org/sandbox/eft/2141729
which creates a unique node of every repeating instance. Then you get exactly the date of the instance you are viewing, because there is only one date value per instance/node.
You should probably combine this with limiting the repeating instances, as this issue https://drupal.org/node/1901936 has no solution so far.
Cheers!
Comment #30
kevinquillen CreditAttribution: kevinquillen commentedIs there just a way to add the date delta to the URL with a router or some other fashion? Something like..
Which basically should be a clone of the view rendering function, but signals which date value to show from the passed delta?
Example:
node/1 - basic node render display
node/1/date/5 - the node is rendered, but the date field shows the fifth value in its array
I know this can get tricky - entities could have multiple date fields. You'd want to know which field to affect... but there must be some simple way of achieving this besides nothing.
I am already invested in a site with thousands of event dates for repeating nodes, so this seems like a simple enough approach without instituting a lot of change (say, creating nodes per repeating event, for example - instead of date values).
Comment #31
bkosborneI want to clear up some confusion I noticed as I was reading this thread.
Some people are trying to get views that are showing fields to only display one date per "row". This is useful when displaying a listing of events like in a calendar, where you want a distinct "row" for each repeated date on a node. To do this, you need to uncheck the "Display all values in the same row" under the "Multiple Field Settings" when editing the field in the view.
The other group of people are trying to have node pages (when you view a node) only display either 1 date of a repeating set, or only show future dates of the repeating set.
You won't be able to have a node page that just displays 1 relevant date, because when viewing a node it has no idea which of the repeating dates you're trying to display (comment #30 above discusses a potential workaround). Date module does not create multiple distinct nodes for each repeating date. It's just 1 node that has multiple date field entries. Using some nice views integration you're able to split out the repeated dates as described above, but when viewing the actual node, you cannot do that, since there's only 1 node to view.
If you want to display only future dates of a repeating date field, people have been modifying the display formatter for the field to use a relative date to limit the dates shown to only future dates. This would work, but only if your flushing your page caches every day or more often. There's also a sandbox module that tries to make this process a bit nicer. Also see #1715542: Support relative date formats in the filter of the date field output formatter and Date Repeat Entity module (which creates a distinct node for each repeat date).
Comment #32
ramu_bharu CreditAttribution: ramu_bharu commentedI have achieved this by creating two template files.
One is for Calender view page template file to alter event title and another one is for node template.
Here is the code of two files:
1. Calender view page template file to alter event title
views-view-field--calendar--page-1--title.tpl.php
2. node template file to alter event date
node--events.tpl.php
Comment #33
hwasem CreditAttribution: hwasem commentedThe reference by SchwebDesign in #20 was exactly what fixed my problem - partial implementation of PHP's relative date formats.
Comment #34
joshuautley CreditAttribution: joshuautley commented#31 points tot he patch which solves both view and node display.
Thank you.
Comment #35
Steve Polito Design CreditAttribution: Steve Polito Design commentedIt's important to look at #31 and understand there are two different issues at play here.
Shameless plug, but I wrote a tutorial explaining how to display relative dates on a node, and limit a view to only showing future events.
Comment #36
swhitters CreditAttribution: swhitters as a volunteer commentedWhat solved my problem was to check off aggregate in the advanced tab, but NOT distinct.
I was attempting to create a calendar view with a popup colorbox for each event on a date. I had the same problem with the repeating dates (either display all repeated dates or the first date in the series rather than the instance date). If I checked off distinct, only the first event in a repeating series would show up on the calendar.
Checking aggregate worked, but if you have a date with start and end times, you'll need to make sure to group the additional value in the aggregation settings for that particular field.
Hope that helps someone.
Comment #37
Brian E. Conklin CreditAttribution: Brian E. Conklin commented@Steve, Thank you! That's exactly what I needed! We should get this patch added into the module.
Comment #38
Chris2u CreditAttribution: Chris2u commentedMany previous comments advertised using "now" and "display 1 value" in the display formatter would solve the right intended display of the node detail view which it doesn't. If you have three repeating dates in the future and clicked on the first in the calendar view, you would be shown the right one. However, if you clicked on the second, you would still be shown the first one. If the first transitioned to the past, its date would never be shown in the node view anymore. Using "now" is thus only a "solution" if you showed only the next repeating event in calendar AND you didn't show past events in calendar. The only solution I found to this problem is to use a view with "full node rendering" as detail view, which is not optimal, too, as you lose functionality of the node-edit page like edit/manage display etc. If anyone found a better solution to this long standing problem - without extra modules (date_repeat_fm does a decent job but is no longer maintained) - I would be keen to know.
Comment #39
kevinquillen CreditAttribution: kevinquillen at Velir commentedI still think a solid way to solve it is to create your own route with hook_menu... pardon the fact I do not have any code to post.
Menu route: node/%node/view/date/%delta
The callback could pass the node id and field delta argument, and you could either build it there or defer it to a preprocess and pass it in the array.
Essentially, you're looking at the same node, but the URL is signaling what date value to show (by the field delta of that date field).
Then, just have Views use that link instead of the regular node link.
Personally, I would then go back and remove (in code) the event dates from showing in a huge list on the default/full view mode, and add a link that would jump to the calendar filtered on that node id to see all potential dates.
I can understand where some don't want to go that route and feel the UI should do it, but this is how I would solve it.
Comment #40
Vali Hutchison CreditAttribution: Vali Hutchison commented#7 worked for me.
Comment #41
trackleft2 CreditAttribution: trackleft2 commentedThis allows you to use the node row plugin in your view and still use repeating date field.