Support

Home Forums Event Espresso Premium iCal file does not contain the right information

iCal file does not contain the right information

Posted: January 29, 2014 at 5:32 am

Viewing 29 reply threads


Yannis Develekos

January 29, 2014 at 5:32 am

Hi everyone,

The downloaded iCal file from the registration page, contains the right address but never the right date and time. It always has 1/1/1970 at 2:00am.

Any ideas?
Yannis


Dean

January 29, 2014 at 5:58 am

Hi Yannis,

What date format are you using in the WordPress General settings and also in the event itself?


Yannis Develekos

January 29, 2014 at 6:25 am

It’s european date (date, month, year)(in Greek “29 ?????????? 2014”).

What do you mean when you say “in the event itself”. I didn’t know that there are specific date related settings in events. Anyway, it currently reads “2014-02-07”.

I hope I answered your question…
Yannis


Sidney Harrell

January 29, 2014 at 12:05 pm

When you hover over the iCal link, can you see the startyear, startmonth, startday, and starttime in the request? Are they correct there?


Yannis Develekos

January 29, 2014 at 2:53 pm

No, it just reads “iCal import”.


Yannis Develekos

January 29, 2014 at 2:55 pm

http://www.diadima.gr/event-registration/


Dean

January 30, 2014 at 1:49 am

Hi,

Thanks for the link, that helped.

Can you screenshot the date settings in Settings > General and also the registration and event dates from this event please http://www.diadima.gr/event-registration/?ee=4

That will give us a clearer indication of the actual issue.


Yannis Develekos

January 30, 2014 at 7:12 am

Hi Dean,

I want to thank you for your efforts!

Settings screenshot.

.

Regards,
Yannis


Yannis Develekos

January 30, 2014 at 7:13 am

Hi Dean,

I want to thank you for your efforts!

Settings screenshot.

Event Settings.

Regards,
Yannis


Seth Shoultes

  • Support Staff

January 30, 2014 at 10:19 am

That is a really strange issue. Everything looks correct, but it seems like the dates are getting removed from ics link.

Can you please post a list of installed plugins?


Yannis Develekos

January 30, 2014 at 12:59 pm

Hi Seth,

Installed plugins list below. I just want to mention that I have excluded event espresso pages from super cache plugin. Looking forward for your answer.

Yannis

Contact Form 7, Easy FancyBox, Envato WordPress Toolkit, Event Espresso, Event Espresso – Calendar, Event Espresso – MailChimp Integration, Event Espresso – Members Addon, Multi Events Registration addon for Event Espresso., Event Espresso – Permissions, Event Espresso – Recurring Events, Recurring Events addon for Event Espresso., Event Espresso – Social Coupons, Event Espresso – Social Media, Event Espresso – Ticketing, Ticketing system for Event Espresso, Event Espresso API Plugin, A JSON/XML API for Event Espresso, Jetpack by WordPress.com, LayerSlider WP, Revolution Slider, WordPress Backup to Dropbox, WordPress Importer, WordPress SEO, wp-Typography, WP Super Cache, Yet Another Related Posts Plugin, Zopim Widget.


Sidney Harrell

January 30, 2014 at 2:24 pm

do you know if you have php version greater that 5.3.0? Look under EE->System Status->Server Environment.


Yannis Develekos

January 30, 2014 at 2:38 pm

5.3.28


Sidney Harrell

January 31, 2014 at 11:08 am

Excellent, then this code should work.

You can add this code to one of the following:
1 – Your theme’s functions.php file. It may get overwritten the next time you update your theme.
2 – The EE custom files add-on in the custom_functions.php file.
3 – Use this blank plugin to hold the custom function.


Yannis Develekos

January 31, 2014 at 12:02 pm

It throughs this error:
Fatal error: Call to a member function getTimestamp() on a non-object in /home/diadima8/public_html/yannis/wp-content/uploads/espresso/custom_functions.php on line 21


Sidney Harrell

February 4, 2014 at 11:25 am

That’s really strange. Looks like it’s not creating the DateTime object. Can you try this:

function espresso_ical_prepare_by_meta($meta, $title = '', $image = '', $link_only = FALSE) {
 var_dump($meta['start_date']);
 var_dump($meta['start_time']);
}

You can just put it in, grab the output it generates where the ical link was, and then take it out. It should give us a clue about why it is not creating the DateTime object.


Yannis Develekos

February 15, 2014 at 3:46 pm

Hi everyone,

I’ve been super busy lately, so I didn’t have the time to deal with this problem, but I have to get back to this in order to finally resolve it. I put the code above in the custom_functions.php file and it throughs the error:
Fatal error: Call to undefined function  var_dump() in /home/diadima8/public_html/yannis/wp-content/uploads/espresso/custom_functions.php on line 16


Yannis Develekos

February 15, 2014 at 3:53 pm

… and I tried to use the code you provided me with, from the previous post page and now it throughs the error:
<pre class=”brush: text; gutter: true; first-line: 1; highlight: []; html-script: false”>Warning: date() expects parameter 2 to be long, string given in /home/diadima8/public_html/yannis/wp-content/uploads/espresso/custom_functions.php on line 39


Sidney Harrell

February 17, 2014 at 5:25 am

That’s really strange. var_dump has been a core php function since php 4. Can you try it with print_r instead of var_dump?


Yannis Develekos

February 18, 2014 at 4:00 am

Fatal error: Call to undefined function ?print_r() in /home/diadima8/public_html/yannis/wp-content/uploads/espresso/custom_functions.php on line 16


Yannis Develekos

February 18, 2014 at 4:06 am

Please ignore my previous post. Update coming…


Yannis Develekos

February 18, 2014 at 4:13 am

So… I stopped using notepad++ for code editing this particular file because I noticed that a questionmark existed in my post above and both var_dump and print_r worked. var_dump output:
string(21) “7 ???­???? 2014? string(5) “09:30″
What’s next?

Regards,
Yannis


Yannis Develekos

February 19, 2014 at 8:32 am

… the questionmarks above is the Greek word for “January”.


Sidney Harrell

February 19, 2014 at 1:29 pm

I see what’s going on now. The date is getting run through date format AND i18n before it gets added to the meta data that gets passed to the iCal function. Can you make a copy of event_list.php and registration_page.php from plugins/event-espresso/templates into uploads/espresso/templates? In event_list.php you want to change these two lines (375 and 376 in the copy I’m looking at):

'start_date' => event_date_display($start_date, get_option('date_format')),
					'end_date' => event_date_display($end_date, get_option('date_format')),

to:

'start_date' => date($start_date, get_option('date_format')),
					'end_date' => date($end_date, get_option('date_format')),

similarly in registration_page.php (lines 213 and 214) from:

'start_date'			=> event_espresso_no_format_date($start_date, get_option('date_format')),
                'end_date'				=> event_date_display($end_date, get_option('date_format')),

to:

'start_date'			=> date($start_date, get_option('date_format')),
                'end_date'				=> date($end_date, get_option('date_format')),


Yannis Develekos

February 20, 2014 at 3:24 am

Warning: date() expects parameter 2 to be long, string given in /home/diadima8/public_html/yannis/wp-content/uploads/espresso/templates/event_list.php on line 375

Warning: include(event_list_display.php) [function.include]: failed to open stream: No such file or directory in /home/diadima8/public_html/yannis/wp-content/uploads/espresso/templates/event_list.php on line 433

Warning: include() [function.include]: Failed opening ‘event_list_display.php’ for inclusion (include_path=’.:/usr/local/php53/pear’) in /home/diadima8/public_html/yannis/wp-content/uploads/espresso/templates/event_list.php on line 433


Sidney Harrell

February 20, 2014 at 9:37 am

It may be easier for us to debug it in place on your server, rather than going back and forth like this. Can you fill out the form here and be sure to include ftp (or ssh) credentials for debugging purposes. While we cannot guarantee priority without the purchase of a support token, I will certainly take a look.


Robert Ferrer

February 28, 2014 at 7:58 am

Hi, I’ve run into the same issue. Could you please update this thread with how you’ve fixed the bug?


Sidney Harrell

February 28, 2014 at 3:19 pm

Sorry, I never got login credentials from Yanis to take a look. Have you done any of the debugging steps we went through?
Looking back on that last error message, and then looking at the code, I can see that we were supposed to tell you to copy event_list_display.php and registration_page_display.php into the uploads/espresso/templates folder as well as the two that I listed.


Yannis Develekos

March 1, 2014 at 11:52 am

Hey, I’m sorry for the late reply, but I decided to stop working on debugging this. After Sidney’s comment above I thought that it would be inappropriate to spend his time for nothing. I decided to upgrade to Event Espresso 4 in the 7th of March. Good luck! I will let you know if the problem does not persist in v4.


Seth Shoultes

  • Support Staff

March 3, 2014 at 10:01 pm

Thanks for the update!

Viewing 29 reply threads

The support post ‘iCal file does not contain the right information’ 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