Events Made Easy › Forums › How do I … › How do I… save data ?
- This topic has 8 replies, 2 voices, and was last updated 3 years, 2 months ago by Franky.
-
AuthorPosts
-
Thu 16 Sep 2021 at 21:04 #63174AnonymousInactive
Hello,
I’m trying your plugin. It’s seems to do what I would like, but when I click on the “save” button, my page is reloading and I haven’t any data in “Pending bookings” or “Approved bookings”. Do you know why ?
https://www.lesbottinesdeslacs.be/events/bottines-des-lacs/#
Thanks a lot.
Guillaume.Thu 16 Sep 2021 at 21:11 #63175FrankyKeymasterIf the page is reloading, it means the booking didn’t went through at all due to some javascript issue. I tried subscribing, and it seems the code returns the same form but with the error that javascript is needed. Since the return code is no real json, from the users perspective the form seems to be reloading.
I’m going to try to reproduce that here …Thu 16 Sep 2021 at 21:26 #63176FrankyKeymasterOk, your page is not executing javascript at all. I see this at the bottom of your generated page: “HTML compressed” ==> do you have some compression/optimization/caching plugin in place? That is probably messing up all javascript …
Thu 16 Sep 2021 at 21:34 #63177AnonymousInactiveHello,
I’m using “Asset CleanUp: Page Speed Booster” and I excluded from minify and combine those pages :
wp-includes/js/thickbox/thickbox.js
wp-content/plugins/events-made-easy/js/client-clock.js
wp-content/plugins/events-made-easy/js/eme.js
wp-content/plugins/events-made-easy/js/eme_location_map.jsThanks a lot for your help.
Thu 16 Sep 2021 at 21:41 #63178AnonymousInactiveI removed all compression/optimization/caching plugins and code and I still have the same problem 🙁
Thu 16 Sep 2021 at 22:53 #63179FrankyKeymasterWell, something went wrong now: eme.js is totally not loaded … in fact almost no js file is loaded (I’m beginning to wonder about your theme here and not the minification plugin).
Can you go in the EME admin options, tab ‘Generic’ and set the option “Always include JS in header” ? Based on other js, that might help.Thu 16 Sep 2021 at 23:36 #63180AnonymousInactiveHello Franky,
Thank you very much for your help.
I tried this, but it doesn’t change anything. So i tried to add this directly into the footer.php :
<script src=”/wp-includes/js/thickbox/thickbox.js”></script>
<script src=”/wp-content/plugins/events-made-easy/js/client-clock.js”></script>
<script src=”/wp-content/plugins/events-made-easy/js/eme.js”></script>
<script src=”wp-content/plugins/events-made-easy/js/eme_location_map.js”></script>And now I have
“eme.js:228 Uncaught ReferenceError: emebasic is not defined”Does that mean anything to you?
Thu 16 Sep 2021 at 23:52 #63181AnonymousInactive🥳🥳🥳🥳🥳
I found the problem.
eme.js needs “array(‘jquery’)” to work.
I had another name to load jquery. It was
wp_dequeue_script( ‘jquery’);
wp_deregister_script( ‘jquery’);
wp_enqueue_script( ‘jquery-something’, get_template_directory_uri() . ‘/js/jquery.min.js’, array(), ‘2.1.4’, true );I renamed ‘jquery-something’ into ‘jquery’ and it works.
Sorry for this and really thank you for you help !
Thu 16 Sep 2021 at 23:53 #63182FrankyKeymasterYes it does. EME uses translated javascript. Directly including them won’t work. But I just checked your page: it seems to be ok now.
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.