Support

Home Forums Event Espresso Premium [state_date] [end_date]

[state_date] [end_date]

Posted: October 20, 2013 at 5:12 am

Viewing 14 reply threads


Brittany Stone

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?


Dean

October 21, 2013 at 1:11 am

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?


Brittany Stone

October 21, 2013 at 10:02 am

We are using:
EE 3.1.35.1.P
RE 1.1.7.1


Brittany Stone

October 21, 2013 at 10:03 am

Where are the shortcodes/functions that create the two shortcodes?
Maybe I have them overwritten or something, just so I can make sure.


Josh

  • Support Staff

October 21, 2013 at 2:28 pm

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 ?


Brittany Stone

October 21, 2013 at 7:52 pm

First off, thought I’d share this for reference:
[code]Event Espresso version 3.1.35.1.P
WordPress version WP 3.6.1
Installed plugins
Event Espresso – Price Modifier by Event Espresso version 0.0.3.1.B,
Custom Upload Dir by Ulf Benjaminsson version 3.4,
Enable Media Replace by Måns Jonasson version 2.9.3,
Event Espresso – Calendar by Event Espresso version 2.0.6.2,
Event Espresso API Plugin by Event Espresso, (Mike Nelson) version 2.0.2.p,
Event Espresso – Recurring Events by Event Espresso version 1.1.7.1,
Event Espresso – Ticketing by Event Espresso version 2.0.10.2.p,
Event Espresso by Event Espresso version 3.1.35.1.P,
Hotfix by Mark Jaquith version 1.0,
PHP Text Widget by Stefano Lissa version 1.0.5,
Preserved HTML Editor Markup by Marcus E. Pope, marcuspope version 1.5,
Regenerate Thumbnails by Viper007Bond version 2.2.4,
Widgetkit by YOOtheme version 1.4.6,
WP Custom Admin Bar by Wes Todd version 1.3.5,
WP Editor by Benjamin Rojas version 1.2.2,
WP Migrate DB Pro by Delicious Brains version 1.2[/code]

Next up, I took a look at an event, and it is being stored like YYYY-MM-DD


Brittany Stone

October 21, 2013 at 7:53 pm

http://s.ankemp.com/skitch/Screenshot_10_21_13_6_51_PM_181611C5.png


Dean

October 22, 2013 at 1:34 am

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.


Brittany Stone

October 25, 2013 at 4:26 pm

Hey Josh, do you have any update on this?


Josh

  • Support Staff

October 25, 2013 at 6:00 pm

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.


Brittany Stone

October 28, 2013 at 12:56 am

There are not start and end times.
As there are no specific start and end times.


Josh

  • Support Staff

October 28, 2013 at 10:18 am

Hi Brittany,

That’s why the shortcodes are not working. There needs to be times entered there.


Sidney Harrell

October 28, 2013 at 10:35 am

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);


Brittany Stone

October 28, 2013 at 10:51 am

Thanks Sidney!

Is there anyway to use Custom Files to overwrite the function rather than editing the file?

Thanks!


Dean

October 29, 2013 at 2:59 am

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;
    }
Viewing 14 reply threads

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.

Event Espresso