Support

Home Forums Event Espresso Premium Error showing when createing a blog post from an event.

Error showing when createing a blog post from an event.

Posted: April 15, 2015 at 9:51 am


JimByrne

April 15, 2015 at 9:51 am

Hi,

I’m installing and testing Event Espresso at the moment. I’ve added a couple of events and checked the box to say they should appear in my website blog in a specified category – i.e. Birnam Blog and Home page news – which are blog categories I have set up.

However, the events are either not appearing if I leave the Post type to Espresso Event or appear with an error on the post if I set it to a Post.

The error message is

“Warning: Creating default object from empty value in /home/birnamusrd/birnam.jimbyrne.co.uk/wp-content/plugins/event-espresso/templates/event_post.php on line 60”

My development site is at http://birnam.jimbyrne.co.uk
Here’s an example page with a post showing an error: http://birnam.jimbyrne.co.uk/jo-caulfield-a-celebration-of-anger/

Thanks,
Jim


Lorenzo Orlando Caum

  • Support Staff

April 15, 2015 at 11:06 am

Hi Jim, could you copy and paste the macro in the following link into your wp-config.php file and save changes?

https://gist.github.com/lorenzocaum/848801a1173be464fbe7#comment-1239850

The wp-config.php file can be found in the WordPress root which is accessible via an SFTP or FTP client such as FileZilla or Cyberduck.


Lorenzo


JimByrne

April 16, 2015 at 3:05 am

Ok Lorenzo, I’ve done that. What am I looking for in terms of debugging data? I’ve tried posting another event – and it’s just the same as before, i.e. either nothing when I post it as a Espresso Event post – or with errors if I post as a Post.

Your help is appreciated.
Jim


Dean

April 16, 2015 at 5:18 am

Hi Jim,

Looking through tickets and forum posts, this might be due to eror reporting being and and your running PHP 5.4+

Please disable WP_DEBUG and any error reporting you have in the wp-config.php

Then please disable error reporting in PHP by adding

@ini_set(‘display_errors’,’Off’);

to your wp-config.php above any of the require statements.

Then please update the events (just click the update button) that have posts attatched to them.


Tony

  • Support Staff

April 16, 2015 at 5:47 am

The fix Dean provided disables the error reporting on your server (which is best disabled on a live server anyway) however you can also fix this by going to:

event-espresso/templates/event_post.php

After line 24 add this line of code:

$data = (object)array();

Like so – http://take.ms/9ygwQ

Then again update your event, that will prevent the warning from being thrown.


JimByrne

April 16, 2015 at 6:54 am

Thanks Tony, Dean. That’s got rid of the error.
Jim


Dean

April 16, 2015 at 6:58 am

That’s great to hear! May we mark this as resolved?


JimByrne

April 16, 2015 at 6:59 am

Though I still don’t know what is supposed to happen when I choose the post type ‘Espresso Event’ – that doesn’t create any post that I can find anywhere.

Jim


Tony

  • Support Staff

April 16, 2015 at 7:52 am

That option is enabled when you set Event Espresso -> Template Settings -> ‘Use the custom post types feature?’ to Yes and allows you to create ‘Events’ posts from your EE events.

With that setting enabled you should see a ‘Events Posts’ section within your dashboard, like this – http://take.ms/ajasB

When you select ‘Post’ it simply creates a standard WP post using your EE date, using ‘Espresso Events’ you create an post of the ‘event’ type that can be styled or manipulated as you can then use files within your theme to style those specific posts if you prefer.

We have a wiki on how to setup the Espresso Event post types here:

https://eventespresso.com/wiki/custom-post-types-basic-setup/

It depends on what you are trying to achieve as to whether or not you use these, if you want the posts to show up in your standard posts, use normal Posts, if you want to make changes to the events posts and get more specific you can use the Espresso Events post type.

The support post ‘Error showing when createing a blog post from an event.’ 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