Support

Home Forums Event Espresso Premium Another plugin causing JS errors with Event Espresso when creating a Ticket

Another plugin causing JS errors with Event Espresso when creating a Ticket

Posted: October 21, 2015 at 7:48 am


Joren

October 21, 2015 at 7:48 am

I’ve also submitted a support request to plugin in question, WP Simple Pay Pro for Stripe, to see if they have any idea but I wanted to post here too in order to try and get this resolved as quickly as I can.

When that plugin is activated, we cannot create Tickets in Event Espresso. It causes a javascript error when clicking the Create Ticket button, and the rest of the ticket creation details fails to appear. Hitting “Update” after filling in the details causes nothing to happen – the ticket doesn’t save.

here’s the error that’s firing http://i.imgur.com/vndZXQr.png


Tony

  • Support Staff

October 21, 2015 at 8:03 am

Hi Joren,

I tried installing the lite version of the plugin on a local site and had no issues, can you send us a copy of the pro plugin so we can see if we can see whats happening please?

Is so please use support[at]eventespresso.com


Joren

October 22, 2015 at 7:33 am

Hey Tony, I sent the plugin yesterday shortly after your reply, just wanted to confirm that someone got it, thanks!

I heard back from the plugin author themselves and so far they haven’t provided much help


Tony

  • Support Staff

October 22, 2015 at 8:35 am

Hi Joren,

I tried the pro version of the plugin and didn’t run into any issues.

If you de-activate the plugin does EE work as expected? Its possible the issue only shows up when that plugin is activated, but it may not be the root cause of the problem.

From within the event editor, open up chrome dev tools and within elemenets search for ‘moment’, do you see 2 JS files? – http://take.ms/hCKB7


Joren

October 22, 2015 at 8:54 am

Correct, EE works fine when this plugin is disabled

I have 3 moment scripts on the page when the plugin is installed http://i.imgur.com/tBodNoC.png

2 when it’s not http://i.imgur.com/81Y0veN.png

Maybe it has something to do with the other plugin’s moment.min.js then? https://www.simpleque.com/wp-content/plugins/stripe-checkout-pro/assets/js/vendor/moment.min.js


Tony

  • Support Staff

October 22, 2015 at 9:19 am

Are you sure you have sent me the correct plugin?

I have stripe-checkout-pro-manager, there is no moment.min.js file within that plugin and it looks like a different file structure. I can’t find any settings/options (or any sign at all) of the plugin you’ve sent when I activate it.


Joren

October 22, 2015 at 9:24 am

Crap, I did send you the wrong one, they have almost the exact same name. I will follow up my email with the correct attachment. Really sorry about that.


Tony

  • Support Staff

October 22, 2015 at 9:50 am

I’ve tested that plugin on 2 different sites and not had any issues, the moment library from within that plugin doesn’t loads on the EE pages on my sites.

It will very likely be due to that file loading within the event pages, but I’m not sure why it loads on your site but not mine.


Joren

October 22, 2015 at 10:11 am

You’re looking at the backend correct, on the edit event admin page? Just double checking. Maybe it needs the license key, I’ll try sending that to you via email and see if that works


Tony

  • Support Staff

October 22, 2015 at 12:31 pm

Yes I’m testing the admin, creating new datetimes and tickets does not throw any JS error and moment.min.js is not loaded within the event admin.

Their license key provides access to support and auto updates so that won’t effect this.

I think ultimately you’ll need further information from the plugin author as I can’t see any reason that moment file to be loaded on the page and on both my test sites this works as expected.

I would try setting up a development copy of the site if you don’t already have one, the quickest way to set up a development copy is using the Duplicator plugin. Then on that site, switch back to a default theme such as twentyfourteen retest.

If it still doesn’t work try with only EE and that plugin running, does it work then?


Joren

October 22, 2015 at 1:06 pm

Thanks. I did some more troubleshooting with plugins. If I disable Advanced Custom Fields, then it turns out those scripts from the Stripe payment plugin no longer load. The feedback I’ve gotten from the plugin developer so far is that their scripts should not be loading in the admin like that. So ACF is causing them to load for some reason.

What a spaghetti mess. I usually never have issues with ACF, use it on every website, that plugin’s amazing. Not sure how I should proceed now though.


Josh

  • Support Staff

October 22, 2015 at 1:53 pm

Do you have any ACF fields set to load in the Event Espresso event editor that feature time/datepickers? If so, you can try changing them to text fields.


Joren

October 22, 2015 at 1:57 pm

I do have a couple text fields and one wyisiwyg field loading on events in the admin through ACF. Tried disabling those temporarily but that didn’t help, seems as long as the plugin is active then it’s still causing a problem


Tony

  • Support Staff

October 22, 2015 at 2:56 pm

I don’t know what is causing ACF to load that moment file within the Event Editor page but I have a workaround to remove the script which allows EE to work as expected.

I can’t say this is a ‘solution’ as I don’t know why that script loads in the first place but it does work on my test sites.

Download this plugin – http://take.ms/ZTAQ2

Install and activate it on your site and retest the Event Editor.

Do the tickets now create within throwing errors and save as expected?

(The plugin simply deregisters the script when loading the Event Editor)


Tony

  • Support Staff

October 22, 2015 at 2:57 pm

Note that if anything actually needs that moment.js file within the event editor (EE uses its own files) then it will no longer function with that plugin active, so you’ll want to test the feature your are using to ensure everything still works.


Joren

October 22, 2015 at 3:04 pm

That worked! Thanks a bunch. ACF fields continued working on the page too after that.


Tony

  • Support Staff

October 22, 2015 at 3:25 pm

You most welcome 🙂

The support post ‘Another plugin causing JS errors with Event Espresso when creating a Ticket’ 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