WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Events list in chronological order (51 posts)

  1. lucycgp
    Member
    Posted 2 years ago #

    Hello all,

    I am trying to find an answer to this but I can't! The Events Calendar is really really good, and has helped me no end, but one thing is bugging me. How do you make events appear chronologically, so the soonest event at the top? At the moment the events list is showing in the order I posted them which looks all wrong.

    Sorry if I am repeating a question, but I cannot find the answer and have been trying to find it for a couple of hours.

    Thank you to anyone that may be able to help!

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey there Lucy. Have you resaved your permalinks after installing? By default they should be showing in chronological order as you've requested so I'm not sure why they wouldn't be.

  3. lucycgp
    Member
    Posted 2 years ago #

    Hey roblagatta! Thank you for replying so quick, and sorry for my tardy reply! I have my permalinks as /%year%/%monthnum%/%day%/%postname%/ currently following your reply. I changed them from default to the above and unfortunately it didn't make a difference.

    Just to be clear, it's in the events list view on a page that are in the order of posting rather than the order of the event, and I need them in the order of the events coming soonest at the top. The widget is in the correct order and the calendar is fine too.

    Is this possible and if it is, how can I acheive this? If it's not possible, is it possible through the paid version?

    Thank you for any help you give.

    Lucy

  4. uwest
    Member
    Posted 2 years ago #

    Hello,
    i got the same problem as discribed above. My permalink is the same. The order of the events is sort by the date of posting. Thanks for all, Uwe

  5. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Thanks for confirming folks. This is odd, as I'm unable to recreate it on a default 2011 install with no other plugins active; even when I used the same permalink structure you noted, I had no problems.

    It should be listing them appropriately by default...this wouldn't change between PRO and FREE. Is it possible you guys have other plugins installed that could be conflicting here? Would you be willing to give deactivating those a shot (and reverting to the 2011 theme, if necessary) to see if the issue persists?

  6. uwest
    Member
    Posted 2 years ago #

    Hi roblagatte,
    i deactivate all plugins but there is no change visible. I don´t know what to do.
    You can see it here:

  7. uwest
    Member
    Posted 2 years ago #

  8. uwest
    Member
    Posted 2 years ago #

    Is it possible, that i only see the beginning of on event, not the whole entry? Like a teaser or so.

  9. lucycgp
    Member
    Posted 2 years ago #

    Hi all, thank you for your help so far, but just to confirm, I have disabled my plugins too and that doesn't help the ordering issue.

    I have just bought the PRO version, so I really hope to get a fix on this as it does everything I need to do. My client is really happy with the function of everything, but just this one thing is standing in the way.

    Anything else you can do to help would be really appreciated.

    Thank you in advance, Lucy

  10. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Sounds like this may be a bug with the core plugin; I'm not able to recreate, as I mentioned previously, so I'm going to have to jump into testing it myself. We'll get this fixed for 2.0.2 (if we can identify the cause in time), or 2.0.3 if not.

  11. faberk
    Member
    Posted 2 years ago #

    I have same problem, on wordpress 3.1.2.
    Same problem on the widget too. The order is posting date and not EventStartDate.
    I search the error, and i think is on "tribe-event-query.class.php" file, on execution of setUpcomingDisplayTypeArgs funciont, on row 135.
    I hope this help you on bug search.

    Bye

  12. tourmalene
    Member
    Posted 2 years ago #

    I am using The Events Calendar and am having the same problem. Oh my goodness! They are not showing chronologically, but are showing by last input. This is a HUGE HUGE problem! Does anyone have any additional updates?
    http://wordpress.org/extend/plugins/the-events-calendar/
    http://www.powerupyourbrain.com/events/upcoming/

  13. tourmalene
    Member
    Posted 2 years ago #

    I am now going back and editing the dates published of the events so that they appear chronologically. If anyone has any updates so I don't have to do this every time, that would be great!

  14. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey guys. Sorry to hear that you're having problems on this; we're not sure what could be causing it but I've got one of our advanced devs taking a look now. They'll be able to identify if it's a bug that needs fixing in 2.1 and hopefully can provide a workaround in the interim.

  15. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Guys, just wanted to follow-up on this. We're having a really hard time recreating this on our end. Is there any chance someone would be willing to give it a shot on a default 2011 install with no other plugins active, to see if the issue persists for them? If not, we may be able to narrow down what the conflict could be.

  16. uwest
    Member
    Posted 2 years ago #

    Hi roblagatta, i´ve no other plugins active.
    LINK

  17. simonjenner007
    Member
    Posted 2 years ago #

    I am having the same issue. Events are showing in posted order not date order. Upgraded to 2.02 Pro but have the same issue.

  18. simonjenner007
    Member
    Posted 2 years ago #

    A quick check of the code (I am no coder so excuse if I have this wrong) in the-events-calendar/views/list.php and the loop appears not to specify any order - it just looks for posts and takes them in order!

    <?php if (have_posts()) : ?>
    <?php $hasPosts = true; $first = true; ?>
    <?php while ( have_posts() ) : the_post(); ?>

    Simon

  19. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey Simon. I see you mention that you upgraded to 2.0.2; have you had a chance to jump to 2.0.3 (for both free + PRO) yet? That do anything for you?

  20. faberk
    Member
    Posted 2 years ago #

    OK, i temporary solve.
    Modified file ...lib\the-events-calendar.class.php

    Added rows from 1910 to 1924, on function getEvents, this is the new code of the function:

    public function getEvents( $args = '' ) {
    $tribe_ecp = TribeEvents::instance();
    $defaults = array(
    'posts_per_page' => get_option( 'posts_per_page', 10 ),
    'post_type' => TribeEvents::POSTTYPE,
    'orderby' => 'event_date',
    'order' => 'ASC'
    );
    /*--------- Funzione modificata by Faber --------*/
    $upcoming = array(
    'orderby' => 'meta_value',
    'meta_key' => '_EventStartDate',
    'order' => 'ASC',
    'meta_key' => '_EventStartDate',
    'meta_value' => date("Y-m-d"),
    'meta_compare' => '>=',
    );

    if (strpos(strval($args), 'upcoming') > 0) {
    $args = str_replace('upcoming','',$args);
    $args = wp_parse_args( $args, $upcoming);
    }
    /*--------- Fine Funzione modificata by Faber --------*/
    $args = wp_parse_args( $args, $defaults);
    return TribeEventsQuery::getEvents($args);
    }

    I waiting real definitive bug solution.

    Thanks

  21. uwest
    Member
    Posted 2 years ago #

    @faberk, sorry for me it will not work ;-(.
    LINK

  22. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey uwest. If you want me to send you the current code (a bit further than 2.0.3 but not yet stable 2.1), it may fix your issue...worth a shot anyway. Let me know if you're interested; rob at tri.be. Thanks!

  23. faberk
    Member
    Posted 2 years ago #

    Hey uwest. My code writed to work correctly only in the widget.

  24. uwest
    Member
    Posted 2 years ago #

    Hey faberk, now i recognize it. For me too! ;-)

  25. faberk
    Member
    Posted 2 years ago #

    To temporary solve all problem on all pages, yuo can modify only the file: the-events-calendar\lib\tribe-event-query.class.php.
    You need to comment the if section on function dateOrderBy in this mode:

    public static function dateOrderBy($order_sql, $cur_query) {
    			//if( $cur_query->get( 'orderby' ) == 'event_date' ) {
    				$direction = $cur_query->get( 'order' );
    				$order_sql = "DATE(eventStart.meta_value) $direction, TIME(eventStart.meta_value) $direction";
    			//}
    			return $order_sql;
    		}

    [Please post code or markup snippets between backticks or use the code button.]

    So all visualization are in event start order (ASC mode)

    For developers: seems, on $cur_query variable, not content the orderby fild, so bypass the if section.

    Sorry for my bad english, i hope you understand all.

    Bye

  26. uwest
    Member
    Posted 2 years ago #

    Hi faberk, it works!!! Many Thanks for that, a really big help.

  27. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Thanks a lot for sharing that, faberk. I'm going to have our devs double check against this to see what we were doing wrong - and if it was indeed something that needs changing, we'll add into the 2.1 code.

  28. faberk
    Member
    Posted 2 years ago #

    Thanks roblagatta. My simple solution is only for temporary and emergency use.
    I don't know the real solution, i think it neededd deep code knowledge.
    We waiting for definite resolution.

    Best regards

  29. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 2 years ago #

    Hey guys. We took another look at this solution, and here's a solution that could apply more long-term if someone were willing to test and verify whether it works for them (as we've been unable to recreate this problem locally nobody on our team is in a position to do so).

    It looks like the function you edit dateOrderBy is applied to a filter 'posts_orderby', which is applied to the ORDER BY part of the SQL query when getting posts. My good guess as to why it is not working properly for you all is that another function from another plugin (or the theme) is being applied to the filter *before* ours is (mind you, ours only makes a change if the current value is orderby => event_date, which if it has already been filtered, it no longer will be). This means that if another plugin or the theme is ordering and has a higher priority hooking into the filter, it would explain the problem perfectly (and why we are unable to recreate it). One solution is upping the priority of our filter and seeing if that fixes it. In line 35 of tribe-event-query.class, change:

    add_filter( 'posts_orderby', array(__CLASS__, 'dateOrderBy'), 10, 2);

    to

    add_filter( 'posts_orderby', array(__CLASS__, 'dateOrderBy'), 1, 2);

    That ought to do the trick, but please let us know after testing whether or not it actually does. If so we'll include this in the 2.1 code. Thanks!

  30. niczcool
    Member
    Posted 2 years ago #

    Hi roblagatta,
    I have the same problem. I try all the solution above with no luck.

    Please have a peek on these links:
    Case 1
    I'm having Descending order.

    Case 2
    The order is messy..

    Please help!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic