RSS feed with event dates?

Home Forums Calendar Products Events Calendar PRO RSS feed with event dates?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #93591
    Rafael
    Participant

    In the rss feed: is it possible to show the date the event takes place instead of the date when the event was published?

    In 2012 it was mentioned that due to popular demand there would likely be a fix for this issue in the plugin’s 2.1 lifecycle:
    https://theeventscalendar.com/support/forums/topic/feed-shows-date-of-event-publication-instead-of-date-of-event/

    What’s the status now? Are there any plans to implement this function?

    #93806
    Brook
    Participant

    Howdy Rafael,

    First of all, I really appreciate your patience in regard to this.

    I do not believe this is on our radar anymore. Though I will doublecheck with Rob, and if he has anything different to say I will add another reply here. One of the devs said that they ended up scrapping this feature request, basically because it does not make sense.  The field you are referring to is actually called <pubDate>. To change this to something other than the publication date is really violating expectations. In fact, that portion of the feed is actually being generated by WordPress itself, not our plugin. So, we would have to undermine the way WordPress is designed to work in order to accomplish this change.

    Instead we came up with an alternate option that enhances WP feeds instead of subverting their semantics. I see you already found this tutorial on how to add start and end dates to events. You stated in the comments that it was giving you trouble. Can I help you with that? What specifically was happening? Was there an error message?

    Thanks again for your patience. I am sorry nobody updated you. When we end up having to change course on a logged feature request, it can be difficult to contact everyone who requested it.

    – Brook

    #94107
    Rafael
    Participant

    Hello Brook

    Thank you for your prompt and elaborate response. I can now understand why it wouldn’t make sense to subvert the WP feeds that way.

    With regard to the tutorial you mentioned, yes, I’ve tried it back in 2012 and it didn’t work for me. Can’t remember why not.

    So I tried it again just now. Since I want to keep the main feed and the event feed separate, I only copied and pasted the second snippet of code from the tutorial and added it to the theme’s functions.php. Curiously, different browsers reacted very differenty.

    Firefox 26: The event feed didn’t change at all. The main feed broke and spits out some XML error.

    Chrome 27: Both the event feed and the main feed work, but neither of them is styled, so only the “document tree” is shown. Surprisingly there actually is an <ev:startdate> and <ev:enddate> tag with the right information in it.

    IE 11: Both feeds can’t be displayed. It says that there’s an error in the feed, but it doesn’t specify.

    So, I’m completely confused. Apparently the code from the tutorial does customize the feed (as viewing it in Chrome revealed), but the customization either doesn’t show up (Firefox) and/or the main feed and/or the events feed break.

    Do you have any ideas or tips as to what is going on and how to solve this issue?

    PS: I’ve tried the exact same thing on a clean WP 3.8 installation using the Twenty Fourteen theme. All feeds worked across all browsers, BUT the event start/end dates are not shown. (Even though Chrome lists the <ev:startdate> tags in its view of the unstyled “document tree”)

    #94139
    Brook
    Participant

    Regarding your PS/test site, did you have any mock events in there to populate those fields? In my stock install with data, that snippet is functioning swimmingly.

    To assist you with your live site I would need to actually see it with the code installed. I realize this is not always possible. But, if you can throw the snippet up and link to the site here, perhaps I can help diagnose what is happening.

    Thanks for working with me on this!

    – Brook

    #94534
    Rafael
    Participant

    Yes, the test site has events added. The events feed does show the tags with the event start/end date when viewed in Chrome. In FF and IE, however, the events feed does not show those tags (only a short excerpt of the event’s description is displayed).

    On the live site the events feed does show the tags with the event start/end date when viewed in Chrome. In FF and IE, however, both the events feed as well as the main feed are broken and don’t display anything at all (XML error).

    Maybe you can help me identify the problem?

    Live site main feed:
    http://www.vegan.ch/feed/

    Live site events feed:
    http://www.vegan.ch/events/feed/

    #95823
    Brook
    Participant

    Howdy again Rafael,

    First of all, sorry for the delayed response. I was not notified of your reply. It was only when one of our moderators did a pass of the forum did we notice that this topic needs a reply.

    IE & Firefox do bring out a good point. Notice on line 9 of your feed that there is not a line break between the two xmlns. To fix this we will need to add a line break to our events_rss2_namespace() function like so.

    Does swapping that snippet out for the one function currently in your functions.php file fix it for? You still need to keep the tribe_rss_feed_add_eventdate() function and associated actions. Please let me know. Thanks Rafael!

    – Brook

    #95993
    Rafael
    Participant

    Yes, thank you Brook! The code snippet you provided fixed the feeds and they’re now working again not only in Chrome but also in FF and IE.

    What remains is the issue of displaying the event start/end dates. Chrome shows them but not IE and FF. Do you know why?

    #96161
    Brook
    Participant

    Howdy Rafael,

    IE & FF both have a default style if you view the feed directly like you are doing. The default stylesheet hides everything except the title, content snippet, and publish date. Chrome on the other just displays the raw data. If you right click in FF or IE and click view source you will see the raw data, same as Chrome. So really the data is there, IE & FF are just hiding it with their default stylesheet.

    In my opinion Chrome’s lack of styling makes the most sense, considering over 99% of the views an RSS feed gets are from feed aggregators (computer algorithms) who are programmed to only care about the raw data.

    I have never tried to override IE & FF’s default styles. It might be possible using a stylesheet. However you will notice that nearly everyone recommends you not bother with styling RSS feeds. For one thing not all browsers support it. For another you, the person styling it, are probably one the only people that will ever see it style since feed aggregators will completely ignore this. But, if you want to mess with styling it might be possible using a stylesheet.

    Does that make sense? If you do go ahead with styling I’d be interested to see how it turns out.

    – Brook

    #98289
    Rafael
    Participant

    Hey Brook

    Thank you for your elaborate answer. I now understand the situation much better. The RSS feed contains the right data, but it’s not displayed in FF and IE due to their stylesheet. I don’t see the point of messing with those stylesheets either, so I’m not going to do that.

    Since the feeds are working again and the event dates are included I’m going to leave it at that and consider the issue resolved.

    Thank you very much for all your help. 🙂

    #99047
    Brook
    Participant

    Howdy Rafael,

    I am very glad to hear that helped. Thanks for pointing out the issue with our existing tutorial. I will get that corrected.

    By the way, if you have a minute or two, we would love it if you would write a few words for us here: http://wordpress.org/support/view/plugin-reviews/the-events-calendar?filter=5. Happy site building!

    – Brook

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘RSS feed with event dates?’ is closed to new replies.