Support

Home Forums Event Espresso Premium Add More Attendees Toggle Not Working

Add More Attendees Toggle Not Working

Posted: September 10, 2012 at 12:30 am


Stuart Hayes

September 10, 2012 at 12:30 am

Hi there, I cannot get the ‘Add more attendees’ toggle to work, can you advise.

http://starnext.com.au/event-registration/?ee=1

Thanks

  • This topic was modified 11 years, 7 months ago by  Seth Shoultes. Reason: Moving to premium forums
  • This topic was modified 11 years, 7 months ago by  Seth Shoultes.


Dean

September 10, 2012 at 3:25 am

Hello Stuart,

Just had someone else mention this, but as I asked them, have you updated/added a theme or plugin recently? Can you test to see if it works with the Twenty Eleven theme?

Reason being is most of these issues are conflicts with other themes/plugins that arent calling the Javascript in correctly.


Stuart Hayes

September 10, 2012 at 5:17 pm

Hi Dean ,

I tried it with Twenty Eleven and yes it works – but doesn’t display as a click to toggle but as a straight out dropdown list but I want the plugin to work with my theme.

I disabled all plugins with my theme and it still doesn’t work, the javascript error I can see that relates to Espresso that fails when the event page loads is below

$("#allpage-login-top").pageSlide({ width: "334px", direction: "left"});
Uncaught TypeError: Property '$' of object [object Window] is not a function
$("#allpage-signup-top").pageSlide({ width: "334px", direction: "right" });
$("#allpage-search-top").pageSlide({ width: "350px", direction: "left", modal: true });
$("#homepage-login-button").pageSlide({ width: "350px", direction: "left" });
$("#homepage-signup-button").pageSlide({ width: "350px", direction: "right" });

  • This reply was modified 11 years, 7 months ago by  Stuart Hayes.


Chris

September 10, 2012 at 7:09 pm

I ran your site through http://site-perf.com/

The problem is a js conflict. WordPress is calling for jquery.js?ver=1.7.2 Thats fine, but your theme is calling for themes/multidesign/js/jquery-1.4.2.min.js

Having two like that is conflicting. If I were to fix this I would open theme php files until I found where that old jquery is called from and remove the line. I’d upload the new file minus the line, clear all caches and try it again.

I fixed this on my own site via this method. It also helped me update some plugins that were requiring old version of jquery.

What theme or style have you used to dress up the form like that? -EDIT: Good CSS3

-EDIT: Your menubar on this page is messed up too. You can see by hovering the mouse over the home button and watching the menu turn white. I looked a bit but am unsure why this happens. I was thinking its a side-effect of the jquery conflict but it looks like css.

  • This reply was modified 11 years, 7 months ago by  Chris.
  • This reply was modified 11 years, 7 months ago by  Chris.
  • This reply was modified 11 years, 7 months ago by  Chris.
  • This reply was modified 11 years, 7 months ago by  Chris.


Jonathan Wilson

September 10, 2012 at 9:53 pm

Chris, thanks for your reply. Yes, there are problems with JavaScript in the theme.

Stuart, you are experiencing exactly what is talked about in the troubleshooting guide here: https://eventespresso.com/wiki/troubleshooting-event-espresso/#registration.

See the second screen shot below “JavaScript errors”. You either need to replace the $ with jQuery or wrap these functions in a no-conflict wrapper. This is explained in the WordPress codex here: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers.

If you are unsure how to do this, you may need to contact your theme developer.


Stuart Hayes

September 10, 2012 at 9:53 pm

Hey Chris,

Thanks man – you got it in one! jquery conflict! removed the old one and all is good.

Thanks for the compliment on the styling – all handcoded CSS3, gotta love those gradients (apart from IE)


Seth Shoultes

  • Support Staff

September 10, 2012 at 10:12 pm

@chris nice catch! Thanks for helping out ๐Ÿ™‚

@Stuart nice job on the reg form. Looks great!

@dean and Jonathan hope you guys are taking notes ๐Ÿ˜‰

  • This reply was modified 11 years, 7 months ago by  Seth Shoultes.
  • This reply was modified 11 years, 7 months ago by  Seth Shoultes. Reason: text edit


Dean

September 10, 2012 at 11:47 pm

@Stuart glad you got it resolved!
@chris thank you! and interesting site, noted that one.

Marking this resolved.


Stuart Hayes

September 13, 2012 at 10:11 pm

Hi,
Sorry this is back open again.
After disabling the older jquery other issues went wrong with my site – so I re-enabled and am using jquery 1.7.2 but still have issue with the toggle attendees option.

Jonathan you said “You either need to replace the $ with jQuery or wrap these functions in a no-conflict wrapper.”
Where is the location of the script that I need to change?

THanks


Stuart Hayes

September 13, 2012 at 10:32 pm

Ok found the script and added jquery in replace of $ this stops the error in the console but the toggle is still not working..

Fixed now had to edit 3 other javascript files by changing the $ variable to jQuery – now all is OK

  • This reply was modified 11 years, 7 months ago by  Stuart Hayes.


Dean

September 13, 2012 at 11:34 pm

Well done on fixing it Stuart.


Brian Sterr

September 17, 2012 at 2:17 am

Just out of curiosity, where was the script you had to change? I am having similar issues. The theme I am working with was originally running 1.7.1, so I updated it to the latest version 1.8.2, but continue to have issues and can’t seem to get the toggle working.

Ideas?

Not even sure where to look for things to wrap with jquery.

http://www.unitedcolorsoffashion.org/event-registration/?ee=1


Dean

September 17, 2012 at 8:16 am

@brian

It looks like the site is loading two jquery files (jquery-1.8.1.min.js and jquery-ui-1.8.18.custom.min.js)

The first one in question is generating an error and stopping the script halfway through due to it. screenshot

From what I can tell, and Im not jquery expert, it looks like some of the code isnt right, in that the [href*=/wp-admin/] should hae quatation marks around the /wp-admin/ bit.


Brian Sterr

September 17, 2012 at 9:22 am

Okay. I’m trying to figure out where that code comes from so I can fix it, as there is no reference to wp-admin in the jquery file itself.

  • This reply was modified 11 years, 7 months ago by  Brian Sterr.


Liquid Factory Web Services s.r.l. P.IVA 11467541006

September 17, 2012 at 11:00 am

Which is the file you made the Jquery replacing?

Would be useful.. thanks


Dean

September 17, 2012 at 11:00 am

It will be in the theme code I reckon as thats what is calling that js file


Brian Sterr

September 17, 2012 at 11:39 am

Is there a piece of the code near the error that would be a good thing to search for? There are a lot of js files attached to the theme and I’m not even sure what I am looking for. The immediate lines above the error don’t seem to have anything unique that would help me to find the issue in the js…


Brian Sterr

September 17, 2012 at 12:39 pm

Well, the href thing was coming from here in jquery.custom.js:

$(document).delegate("a[href^='" + siteUrl + "']:not([href*=/wp-admin/]):not([href*=/wp-login.php]):not([href$=/feed/])", "click", function (event) { event.preventDefault(); linkLocation = this.href;

        content.animate({
            //left: $(window).width()
            left : -850
        }, 400);
        $('.slider-thumb-tray').animate({
            //left: $(window).width()
            bottom : -100
        }, 400);
        logoHolder.animate({
            top : '3%'
        }, 300, redirect);
    });
  • This reply was modified 11 years, 7 months ago by  Brian Sterr.


Brian Sterr

September 17, 2012 at 12:49 pm

Further inspection reveals the following line that ends abruptly. I think this is being generated by Event Espresso functions:

<pre>$jaer = jQuery.noConflict();var attendee_num = 0;var additional_limit = 5;var first_add_button = null;var selector = 'div#additional_attendee_' + attendee_num;function markup(attendee_num) {return '</pre>

Seeing as it is missing closing tags, this appears to be the problem. Why it is unable to run or complete, I am not sure.

  • This reply was modified 11 years, 7 months ago by  Brian Sterr.
  • This reply was modified 11 years, 7 months ago by  Brian Sterr.
  • This reply was modified 11 years, 7 months ago by  Brian Sterr.
  • This reply was modified 11 years, 7 months ago by  Brian Sterr.


Brian Sterr

September 17, 2012 at 12:58 pm

I can’t get the code to display properly here.

That line above beginning with $jaer actually starts with a p and script tag… but there are no closing tags.


Seth Shoultes

  • Support Staff

September 17, 2012 at 1:40 pm

@brian Your theme is wrapping the jquery in <p> tags. If your theme supports it, you can try wrapping the ESPRESSO_EVENTS shortcode, as well all other shortcodes, in RAW tags. Eg. [RAW][ESPRESSO_EVENTS][/RAW]


Brian Sterr

September 17, 2012 at 3:24 pm

It does not appear to support [RAW]. I thought it might be wrapping the queries due to wpautop, but that wouldn’t make sense, as twentyeleven does that as well, but doesn’t have the same issue. Tried disabling wpautop in the theme functions file, but that didn’t work. I obviously don’t want to get rid of a theme for a small error like this, but it is frustrating since I have not worked enough with jquery to figure out where the problem is.


Nina

September 22, 2012 at 11:51 am

I’m having this same issue. I have the genesis theme framework and the latest install of EE (but it wasn’t working on .26 either).


Nina

September 22, 2012 at 11:57 am

The Raw tags work except you then see them on the event registration page.
http://asqboston.org


Katherine Lynch

September 23, 2012 at 3:11 pm

The documentation page is well written, but I seem to miss the file name for the main registration page referenced here:

https://eventespresso.com/wiki/troubleshooting-event-espresso/#registration.

I have tried editing the page via WordPress, and searching for the text “event_espresso_checkout_form” from the installed files, but I am unable toe find the area referenced in the above link.

Could you reply with the file name and location in the install tree? Sorry, but I have been unable to implement this solution yet.

Thanks!


Nina

September 23, 2012 at 7:15 pm

I was in error, the asqboston.org theme is Thesis.
It has jquery 1.7.2.

Any other help on this would be greatly appreciated.
Thanks.


Dean

September 24, 2012 at 12:43 am

@Katherine The main registration page is an actual WordPress page created by Event Espresso on installation. By default it is called Event Registration but it is possible for a user to rename or create a new page with the [ESPRESSO_EVENTS] shortcode in, which is why its not named in the documentation.

@nina Unfortunately your site was down at the time of writing so I couldnt check for any other errors.


Nina

September 24, 2012 at 6:10 am

I didn’t know it had been down. It’s up now if you have a chance to look: http://www.asqboston.org/


Chris Reynolds

  • Support Staff

September 24, 2012 at 10:21 am

@Katherine Lynch Take a look at this doc: https://eventespresso.com/wiki/template-glossary/ — all the template files are listed and described there.

@nina Nothing is jumping out at me about why the additional attendees link isn’t working on your site. I am conferring with the rest of the support team on your issue.


Seth Shoultes

  • Support Staff

September 24, 2012 at 2:19 pm

@nina did you update recently? Is this a default install of Event Espresso? Or do you have template files in your uploads/espresso directory?


Nina

September 24, 2012 at 2:40 pm

I am running 3.1.27P. There are no templates in the uploads but there is the custom-includes files (3 of them).
Thanks Seth…


Seth Shoultes

  • Support Staff

September 24, 2012 at 3:24 pm

Do you know if you copied the event_espresso_additional_attendees function to the custom_functions.php file? If you have, that may need to be updated.


Nina

September 24, 2012 at 3:37 pm

The section indicating additional attendees and creating a drop down instead is all commented out and I see no other reference to it…


Nina

September 25, 2012 at 11:06 am

Where do I find the code for that?


Nina

September 25, 2012 at 1:08 pm

By getting reid of the espresso folder in the uploads section including the custom-includes, etc. the toggle began to work again.


Seth Shoultes

  • Support Staff

September 25, 2012 at 1:37 pm

Weird! Thanks for letting us know. We have been trying to reproduce the issue unsuccessfully.

The support post ‘Add More Attendees Toggle Not Working’ 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