Support

Home Forums Event Espresso Premium Empty Message Box on Checkout

Empty Message Box on Checkout

Posted: April 16, 2019 at 2:29 pm


KMMI training

April 16, 2019 at 2:29 pm

We have been having a problem since installing Event Expresso that we need now fixed since we cant read any error messages on checkout.
This is an identical problem with this post https://eventespresso.com/topic/empty-message-box/
We can not turn off the child or theme since we use this as our major part of our site. We are up to date on the theme, Event Expresso and WordPress and I didnt find a solution to fix this on the other posts in the forum. I dont see any console errors and it can be reproduced just by leaving the form empty and trying to check out https://km-university.com/registration-checkout/?uts=1555441863#checkout for example.
Any help would be appreciated if this is a jQuery, CSS, php problem would be great.


Tony

  • Support Staff

April 16, 2019 at 3:32 pm

Hi there,

It’s actually not a jQuery, CSS or PHP problem, it’s a design issue within the theme itself. The theme assumes that all empty P tags are unused and un-needed, so it removes them from the page using a little JS:

https://monosnap.com/file/4FUOkNfACGWL1AVfVKDJxcVDyBpRuT

The problem with that is EE uses a couple of empty paragraph tags within the message boxes you see as place holders and then when an error is thrown, the text is displayed within those sections, as the theme has removed the placeholder there’s now nowhere for EE to add its error message to be displayed.

Can you send me a copy fo the theme so I can view the code?

One way to fix it is to add some JS to the page to add some content (a . for example) to EE place holders before the theme removes them, I can give you an example if I can view the themes code.


KMMI training

April 17, 2019 at 6:29 am

I agree with your assessment of the problem. This matches up to the other post about this same issue. I will attach a zip of the theme for you to analyze.


KMMI training

April 17, 2019 at 6:31 am

This reply has been marked as private.


Tony

  • Support Staff

April 17, 2019 at 7:12 am

Add something like this:

add_action('wp_enqueue_scripts', 'my_academy_theme_fix', 20);
function my_academy_theme_fix() { 
    $custom_js = '(function($) {
	    $( document ).ready( function() {
	        $("p.espresso-notices-msg").append(".");
	    });
  	})(jQuery);';
    wp_add_inline_script('general', $custom_js, 'before');
}

To your child theme’s functions.php file.

It just adds a period into the EE placeholder paragraph elements using JavaScript right before the theme JS is loaded.


KMMI training

April 17, 2019 at 7:36 am

HI, thank you. This seems to have done the trick.


Tony

  • Support Staff

April 17, 2019 at 10:24 am

You’re most welcome.

The support post ‘Empty Message Box on Checkout’ 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