Posted: October 20, 2013 at 5:12 am
|
[code][start_date][/code] [code][end_date][/code] shortcodes are not working in emails, or the tickets but all other shortcodes are. We are using recurring events. Any suggestions?
|
|
Hi Brittany, I checked those tags in emails and they are working fine on my test server (Event Espresso 3.1.35.1 and Recurring Events 1.1.7.1). What version of EE and Recurring events are you using? |
|
We are using: |
|
Where are the shortcodes/functions that create the two shortcodes? |
Hi Brittany, You would have had to overwrite them in two places (one place in email.php and the other in the ticketing add-on) for that to happen. I’ve seen this happen before where there was a plugin conflict that made it so the date shortcodes did not work. The other potential point of breakage is how the dates are getting stored in the database. When you go in to edit an event is the start date data formatted as YYYY-MM-DD ? |
|
|
First off, thought I’d share this for reference: Next up, I took a look at an event, and it is being stored like YYYY-MM-DD |
|
http://s.ankemp.com/skitch/Screenshot_10_21_13_6_51_PM_181611C5.png |
|
Hi, I am not sure which plugin would be a potential cause of this, maybe Josh remembers which one/s caused it in the past. A simple way to check would be to deactivate all plugins except Event Espresso and make sure the date tags work. If they do re-activate each plugin one by one testing the dates until they fail, then you have the problem plugin. |
|
Hey Josh, do you have any update on this? |
Can you verify that there are start and end times for these events? If there isn’t a start/end time filled out in the event that can also make the start/end date shortcodes not work. |
|
|
There are not start and end times. |
Hi Brittany, That’s why the shortcodes are not working. There needs to be times entered there. |
|
|
Both shortcodes (email and tickets) call the function event_date_display($data->attendee->start_date) That function is in includes/functions/time_date.php starting on line 384. You can try uncommenting the debug line 388. If that doesn’t give you anything, I would insert a couple debug lines right above 390 $temp = strtotime($date); var_dump($temp); var_dump($format); |
|
Thanks Sidney! Is there anyway to use Custom Files to overwrite the function rather than editing the file? Thanks! |
|
Hi, Yes that is possible the function is “pluggable”, adding this to the custom_functions.php will allow you to modify it. function event_date_display($date, $format = '') { $format = $format == '' ? get_option('date_format') : $format; if (empty($date)) { $event_date_display = ''; //echo '<span style="color:red;">'.__('NO DATE SUPPLIED','event_espresso').'</span>'; } else { $event_date_display = date_i18n($format, strtotime($date)); //Fixed for international use } return $event_date_display; } |
The support post ‘[state_date] [end_date]’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.