Support

Home Forums Event Espresso Premium 'Add Attendees' link not working on registration page

'Add Attendees' link not working on registration page

Posted: July 16, 2013 at 12:54 pm

Viewing 5 reply threads


Mike Query

July 16, 2013 at 12:54 pm

Hi there,

On our registration page, the ‘add attendees’ link does not work…it’s just non-clickable text. I have it set up right as far as I can tell. Any ideas?

https://bacc.cc/registration/?ee=51

Thanks!

Mike


Josh

  • Support Staff

July 16, 2013 at 1:57 pm

Hi Mike,

I checked on this and there are a few moving parts involved here on why this isn’t working. I’ll try to explain: The first part is that the Add attendees link uses a JavaScript function to “slide down” additional registration forms. One thing about JavaScript is if there are JavaScript errors happening elsewhere on the web page, other scripts may not function, at all.

So there are two JavaScript errors on this page. One is:

Uncaught TypeError: Object [object Object] has no method ‘cycle’
which is from the aio-shortcodes plugin

the other error is:

Uncaught TypeError: Object [object Object] has no method ‘accordion’
which is from the active WP theme.

What’s happening is, normally on other pages these methods are available and these errors do not happen. On this specific page though, it’s set to load as https instead of http.

So the no method ‘cycle’ error happens because the cycle plugin is being blocked:

[blocked] The page at https://bacc.cc/registration/?ee=51 ran insecure content from http://malsup.github.com/jquery.cycle.all.js?ver=3.5.1.

and the same thing happens for the no method ‘accordion’ error:
[blocked] The page at https://bacc.cc/registration/?ee=51 ran insecure content from http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js?ver=3.5.1.

So a quick solution would be to make the above linked page not load as as https, but I’m guessing that’s set up as https for a reason.

The more robust solution is to change the plugin and the theme to load up local versions of the same scripts instead of from outside sources that do not allow loading via https.

You can contact the developer of the All-in-one shortcodes plugin and ask them if they have a way to load up the jQuery cycle plugin locally (instead of externally). You can let them know that you’re trying to load the page as https and their script is not working and other scripts on the page are not running. (they may not be aware of this issue and it may help them improve their product).

The same would also apply to the theme where they can make it so the jQuery UI library loads internally. WordPress has jqueryUI built-in, so it would only require changing their script to load up only the version that’s included with WordPress.

If the above does not work, a function like this can be added to the theme’s functions.php file to try it so the broken scripts do not load at all on the pages where Event Espresso’s scripts run:

add_action( 'wp_enqueue_scripts', 'my_deregister_javascript', 100 );

function my_deregister_javascript() {
	global $load_espresso_scripts;

	if ( ! $load_espresso_scripts )
		return;
	wp_deregister_script( 'script-handle-goes-here' );// needs handle for ltsc-custom.js from the aio-shortcode plugin
        wp_deregister_script( 'script-handle-goes-here' );// needs handle for the theme's custom.js

}

A good reference on how to find the handle for a theme or plugin’s script can be followed here:

http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles


Mike Query

July 16, 2013 at 2:06 pm

Josh,

Thanks for the detailed answer! I’ll get to work contacting the plugin and theme developer, but in the meantime, couple questions regarding deregistering scripts:

1) How do I find the handles for the plugin and the theme’s custom.js?
2) Do i just add that code to the bottom of the functions.php file, before the last ?> closing tag?

Thanks again!

Mike


Josh

  • Support Staff

July 16, 2013 at 2:27 pm

Hi Mike,

The article that I linked to at justintadlock.com details how to find the handles in the plugin and the theme. Basically what you’re looking for is the line of code where the script gets registered. The article suggests doing a global find (in a text editor that has the capability to find text within a folder) for “wp_enqueue_script”.

You could also search for the scripts file name to find this as well.

With #2, yes that’s what I would try.


Mike Query

July 17, 2013 at 12:19 pm

Hey Josh,

Wow, that totally worked! Thanks for the help. Super grateful. I went ahead and also adjusted the CSS a bit so the link is more noticeable. Couldn’t figure out how to add the green ‘plus’ icon like you see for the subsequent “add attendee” links, but this should suffice for sure.

Thanks again!!

Mike


Josh

  • Support Staff

July 17, 2013 at 1:02 pm

You’re welcome.

You could do something like copy the + icon to your theme’s image folder, then add some CSS like this to use it as a background image:

.add-additional-attendee-lnk {
  background-image: url(path-to-plus-icon-file) no-repeat;
  padding-left: 20px;
}
Viewing 5 reply threads

The support post ‘'Add Attendees' link not working on registration page’ 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