Support

Home Forums Event Espresso Premium 3.1.35 broke my Javascript

3.1.35 broke my Javascript

Posted: September 16, 2013 at 8:30 am

Viewing 18 reply threads


kim white

September 16, 2013 at 8:30 am

I had to go back to the previous version. after installing 3.1.35 my slider and rollovers on my frontpage stopped working.
also the registration page template broke the layout. There appears to be “extra” code in the header.
has anyone else had this problem?
I NEED to update as I do have $100000 problem I would like to be rid of.

Kim White


kim white

September 16, 2013 at 8:30 am

ps. I am using the Genesis Framework


Seth Shoultes

  • Support Staff

September 16, 2013 at 9:34 am

What were the JS errors you were seeing?


kim white

September 16, 2013 at 10:02 am

no error. slider just didn’t work. rollover didn’t work.

Kim


Seth Shoultes

  • Support Staff

September 16, 2013 at 10:28 am

Not sure we have heard of this particular issue. However, we will need more information before we can investigate this further. Is it possible to create a “development” site, with a copy of your existing site with the updates, so we can see this in action?


Sidney Harrell

September 16, 2013 at 10:51 am

Hi Kim,
One change we did make in the last update was to stop loading jQuery by default on all pages, and only load it when we need it for our scripts. One thing you might try is to open plugins/event-espresso/espresso.php and uncomment line 716 so that it reads:

wp_enqueue_script( 'jquery' );

If that fixes it, you should copy that line into your theme’s functions.php file.


kim white

September 16, 2013 at 12:23 pm

I”ve turn it back on for a little bit…
here is an event page…
http://pointmanministries.net/event-registration/?ee=6

should/did look like the other pages.

Sidney, can’t find that line… correct document?


kim white

September 16, 2013 at 12:30 pm

so on the event page it’s adding extra code above the DOCTYPE
<div id=”espresso-event-id-6″>
<div id=”event_espresso_registration_form” class=”event-display-boxes ui-widget”>
<h3 class=”event_title ui-widget-header ui-corner-top” id=”event_title-6″>
Central PA Regional Iron Sharpens Iron Conference </h3>

<div class=”event_espresso_form_wrapper event-data-display ui-widget-content ui-corner-bottom”>

<p class=”section-title”>
Description: </p>
<div class=”event_description clearfix”>

I installed my theme and ALL plugins on another site and do not get the same error.

this is a separate issue from the slider and front page rollover menu not working.
Thanks in advance.
Kim


Sidney Harrell

September 16, 2013 at 12:44 pm

I see 2 things:

<script type="text/javascript" src="/asst/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$('.slideBox.header').hover(function(){
			$(".blanket", this).stop().animate({top:'0px'},{queue:false,duration:200});
		}, function() {
			$(".blanket", this).stop().animate({top:'90px'},{queue:false,duration:200});
		});
	});
</script>

That first line is loading jQuery version 1.4.4, which is breaking our js that is using the “on” function introduced in jQuery 1.7.
The second thing is that js is using the “$”, and not wrapping it in a no-conflict wrapper: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers


kim white

September 16, 2013 at 12:50 pm

I removed the offending code for now. My slider is back.
I’ll work on cleaning it up for my other item to work. THANK YOU!
Now the event page rendering incorrectly…
Kim


Sidney Harrell

September 16, 2013 at 1:39 pm

Can you open up espresso.php and on line 130, where it is now:

add_action( 'init', 'event_espresso_run', 100 );

change it to:

add_shortcode('ESPRESSO_EVENTS', 'event_espresso_run');

and see if that fixes the registration page?


Sidney Harrell

September 16, 2013 at 1:54 pm

I did some more research on this, and it looks like there is another plugin or the theme outputting the contents of the php output buffer in the middle of our code being run. Instead of the change I suggested above, you might try changing line 130 to:

add_action( 'init', 'event_espresso_run', 1000 );


kim white

September 16, 2013 at 2:17 pm

funny, because I turned off all the plugins. I’ll look at my theme files again…

i’ve made this change… this line appears 3 times in the file (259 and a couple soon after)…

no change.
kim


Sidney Harrell

September 16, 2013 at 4:52 pm

I spoke with some of our developers, and we think it may be a problem with a shortcode in the event description. Can you tell us what shortcodes you are using in the event description?


kim white

September 16, 2013 at 4:59 pm

only a short code to make a button to add it to your cart…
[ESPRESSO_CART_LINK event_id=”6″]


Sidney Harrell

September 16, 2013 at 9:15 pm

Can you remove that shortcode temporarily to see if that is where the problem is?


kim white

September 17, 2013 at 5:38 am

yup. that was it.
is there another code I should use?
It’s important I have these buttons as the customers get to add a Lunch ticket.
or buy for other events at the same time.
Thanks you so much,
Kim


Sidney Harrell

September 17, 2013 at 10:53 am

I think we found the problem. Look at the file includes/functions/cart.php on line 1053:

ob_start();

cut that line from there and move it down to 1102:

ob_start();
if ($view_cart && $direct_to_cart == 1) {

It is fixed in the dev branch (3.1.37), so you might need to apply this fix until that comes out.


kim white

September 17, 2013 at 11:18 am

Thanks! that did it.
FYI your number lines are off 100, and ob_start(); appears twice…
but I got the right one.
thank you for all your time. Now I can tell my client!
Kim

Viewing 18 reply threads

The support post ‘3.1.35 broke my Javascript’ 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