EventStartDate = 1

Home Forums Calendar Products Events Calendar PRO EventStartDate = 1

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1320942
    Brent Gustafson
    Participant

    My start dates are all 1, no matter what I set in the admin. What’s odd is the admin remembers my settings, so it has to be stored right someplace.

    I’ve tried deleting the event and making new, and it happens on dev and prod.

    What do I do?

    #1322089
    Andras
    Keymaster

    Hello Rich,

    Thanks for getting in touch with us!

    Sorry about your issue.

    I have checked your site but wasn’t able to see the issue. Can you point me to a page where this is visible?

    Also please go through our Conflict Testing Guide to see if that brings something.

    Looking forward to solving this with you.

    Cheers,
    Andras

     

    #1322227
    Brent Gustafson
    Participant

    Check this out: http://springlake.iwitness.me/?debug=yes

    You can see the EventStartDate in the array is 1, and the date in the image block is 01/01/1970. I’mm attaching a screenshot of some settings I’ve tried.

    #1322686
    Andras
    Keymaster

    Hi Rich,

    Thanks for sharing that! I see that you are using a custom theme, which we are limited in supporting, but I will try to give you some pointers on where the issue could be.

    Did you manage to go through our conflict testing guide? Can you reproduce the issue with a default theme like twentyseventeen?

    How are you inserting the event onto that page? Is it via a shortcode or a custom call?

    Andras

    #1322897
    Brent Gustafson
    Participant

    I did the conflict testing, but it was a few versions (of my code) ago. Could you link me to it again?

    I can replicate it on 2017.

    I write a custom shortcode to get the data. I’m including the code for that. I didn’t do anything crazy, you should be able to run it as-is.

    [springlake_upcoming_events]

    In the process of writing this I figured out a huge clue. It only fails when I’m looking for Featured events, like this:

    [springlake_upcoming_events featured=”yes”]

    So it’s only featured events that don’t have the start date properly.

    #1323226
    Andras
    Keymaster

    Hello Rich,

    Please note that customizations like this are beyond the scope of support that we can provide.

    I quickly checked your code, but not sure what could be the issue.

    Isn’t there a connection missing when you say:

     if ( ! empty( $args['featured'] ) ) {
    $event_args['meta_key'] = '_tribe_featured';
    $event_args['meta_value'] = 1;
    }

    Andras

     

    #1323258
    Brent Gustafson
    Participant

    The connection seems right, since it gets the proper event. Is there a more approved way to get and render featured events? The function I’m using is already an Events Calendar function.

    #1323271
    Brent Gustafson
    Participant

    I figured out a solution. Rather than use the data returned by the query I’m using tribe_get_start_date( $event->ID, false, 'm/d/Y' )

    That gets the proper date, though I suspect with another query.

    I really think there’s a bug there in the original query that should be addressed.

    #1323274
    Andras
    Keymaster

    I will need to pull in an extra set of eyes to take a look at this. Since this is beyond our regular scope of support and bugs and issues of the core plugins are our priority this might take a couple of days, so I ask for a bit of patience. Thanks!

    Cheers,
    Andras

    #1323304
    Andras
    Keymaster

    Hello again,

    A teammate was kind enough to take a look at the code as well. Here’s some more feedback that might help you move forward with this.

    I noticed this at Line 10 of his shortcode: 'start_date' => date( 'YYY-mm-dd' ) . '00:00',

    He’s missing a 4th “Y” in the YYYY

    Also shouldn’t need the esc_sql() in the tax_query — WP_Query already knows how to handle it.

    This article might give you some further info:

    Using tribe_get_events

     

    Here are two more codes to see a better/right way to add the ‘featured’ query.

    https://gist.github.com/cliffordp/1b8c808efa4256ebcef2d8805f069595

    https://gist.github.com/cliffordp/30ac2152a8264ef27235b46b7d16332d

    Also, he could var_dump() or use Xdebug for $event_args before sending to tribe_get_events() to see what’s getting sent to WP_Query.

    He could then var_dump( $events->request ); on the line after running tribe_get_events() (reference: https://ben.lobaugh.net/blog/45390/wordpress-how-to-view-the-sql-query-generated-by-wp_query)

    Hope this helps!

    Cheers,
    Andras

    #1323410
    Andras
    Keymaster

    You also might be interested in https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/#event-list-shortcode

    and could look at how that shortcode does it.

    Or there is this third party plugin which might be of interest:

    The Events Calendar Shortcode & Block

    A.

    #1333528
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘EventStartDate = 1’ is closed to new replies.