Support

Home Forums Event Espresso Premium [espress_events] shortcode no longer works after upgrading

[espress_events] shortcode no longer works after upgrading

Posted: December 14, 2015 at 2:41 pm


ATSI

December 14, 2015 at 2:41 pm

After upgrading to Event Espresso 4.8.26.p today the [espresso_events] shortcode doesn’t work. The page hangs with nothing being displayed. I had to revert back to the default http://www.website.com/events to display my events. Any ideas?

I was using a custom loop-espresso_events.php file in my child theme and when I comment out the while loop the page loads with no events, but with the correct pagination. I even renamed my loop-espresso_events.php as loop-espresso_events.php.old and the shortcode still won’t work.


Josh

  • Support Staff

December 14, 2015 at 4:24 pm

Hi ATSI,

It sounds like you’ll need to update your loop-espresso_events.php file so it now loads espresso_events-shortcode.php instead. You put this inside the while loop:

espresso_get_template_part( 'content', 'espresso_events-shortcode' );


ATSI

December 14, 2015 at 5:50 pm

I actually already made that change because I copied over the new version of espresso_events.php after updating. I am getting the following error. It’s obviously a memory error, but I only have 30 or so events. If I limit the output using [ESPRESSO_EVENTS month=”January 2016″] the page loads, but it repeats events like crazy. You can see the result at http://www.atsicad.com/january. It looks like something is wrong with the loop.

[15-Dec-2015 00:39:43 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 11 bytes) in /home/orthahee/public_html/atsicad/wp-includes/formatting.php on line 793


Josh

  • Support Staff

December 14, 2015 at 5:59 pm

espresso_events.php is not the correct file to load from the loop template. If you can post the code from your custom templates into a gist or a pastebin, then link here, we can offer some guidance on how to fix your custom loop.


ATSI

December 14, 2015 at 6:06 pm

I am not using a custom loop. This is happening with the default loop-espresso_events.php file. Everything worked fine prior to the update that I did today.

If I replace the code below

espresso_get_template_part( ‘content’, ‘espresso_events-shortcode’ );

with echo “hello</br>” I get three hello’s which is the number of events I have in January. This tells me the loop is looping 3 times. Something is wrong with the following line which is not customized at all.

espresso_get_template_part( ‘content’, ‘espresso_events-shortcode’ );


ATSI

December 14, 2015 at 8:17 pm

I was able to get it all worked out. My issue had to do with the new ordering feature that was added. I was ordering things myself with templates and the new system didn’t like it.


Tony

  • Support Staff

December 15, 2015 at 5:40 am

I’m glad you got this worked out.

Did you set Event Espresso -> Events -> Templates -> Use Custom Order to ‘No’ or did you need to make some other changes?


ATSI

December 15, 2015 at 7:29 am

It was already set to “No”. My issue was that I had copied a few of the content- files (like content-espresso_events-details.php) to my Child Theme’s directory so I could customize them. These files were from the older version and were messing things up.


Tony

  • Support Staff

December 15, 2015 at 7:36 am

Ah ok, thank you.

If you have any further problems just let us know.

The support post ‘[espress_events] shortcode no longer works after upgrading’ 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