Home › Forums › Calendar Products › Events Calendar PRO › EventStartDate = 1
- This topic has 12 replies, 2 voices, and was last updated 8 years, 9 months ago by
Brent Gustafson.
-
AuthorPosts
-
July 13, 2017 at 5:01 pm #1320942
Brent Gustafson
ParticipantMy 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?
July 17, 2017 at 6:38 am #1322089Andras
KeymasterHello 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,
AndrasJuly 17, 2017 at 11:20 am #1322227Brent Gustafson
ParticipantCheck 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.
July 18, 2017 at 8:43 am #1322686Andras
KeymasterHi 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
July 18, 2017 at 1:47 pm #1322897Brent Gustafson
ParticipantI 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.
July 19, 2017 at 6:50 am #1323226Andras
KeymasterHello 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
July 19, 2017 at 7:56 am #1323258Brent Gustafson
ParticipantThe 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.
July 19, 2017 at 8:13 am #1323271Brent Gustafson
ParticipantI 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.
July 19, 2017 at 8:17 am #1323274Andras
KeymasterI 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,
AndrasJuly 19, 2017 at 9:08 am #1323304Andras
KeymasterHello 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:
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_argsbefore 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,
AndrasJuly 19, 2017 at 10:05 am #1323410Andras
KeymasterYou 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:
A.
August 10, 2017 at 9:35 am #1333528Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘EventStartDate = 1’ is closed to new replies.
