Support

Home Forums Event Espresso Premium Error messages in pop-up not displaying on registration form page

Error messages in pop-up not displaying on registration form page

Posted: February 11, 2019 at 5:55 pm


mfcm

February 11, 2019 at 5:55 pm

The pop-up containing error messages that is supposed to display on the registration checkout page is empty however it displays properly on the page prior (https://menforchrist.asn.au/events/2019-conference/#tkt-slctr-tbl-1466).

There are no errors in the JavaScript console and when I change the theme using WP Theme Test plugin the same issue occurs. Upon checking the source the espresso-notices-error is empty.


Josh

  • Support Staff

February 13, 2019 at 2:13 pm

Hi,

You could install the Health Check plugin to help troubleshoot this. After the plugin is activated you go to WP → Dashboard → Heath Check → Troubleshooting. There you’ll Enable Troubleshooting Mode, then once that’s activated you’ll reactivate Event Espresso only via the Health Check’s Troubleshooting item in the WordPress Dashboard. At that point, can you check to see if the issue persists?


mfcm

February 18, 2019 at 11:50 pm

Thank you for your help. The errors are being populated after installing the Twenty Nineteen theme, so our theme is causing the issue. Do you have any idea as to what could be preventing the errors from appearing when using our theme?


Josh

  • Support Staff

February 19, 2019 at 9:28 am

Hi,

Someone from EE support staff would need to review a copy of the theme to find the code that’s causing the breakage. Maybe you could upload a copy to Dropbox, Google Drive, or similar and reply here with a download link?


mfcm

February 20, 2019 at 4:49 pm

This reply has been marked as private.


Josh

  • Support Staff

February 21, 2019 at 12:14 pm

All right! Thanks for getting that together.

What’s happening is there’s a little script inside the One theme’s frontend.js that removes all empty paragraphs. The Event Espresso error messages start out as empty paragraph, kind of like a placeholder. Then, if an error is triggered, an error message gets appended to that paragraph. In this case, the theme is removing that placeholder.

Here’s one way to fix:

1) Open the child theme’s functions-custom.php file
2) There you’ll find <?php ?>, remove the closing tag, leaving only <?php
3) Add this after line 2:

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

4) Then save the file

What that will do is add a . to the placeholder paragraph before the frontend.js script loads, which will prevent the One theme from removing the paragraph from the DOM.

The support post ‘Error messages in pop-up not displaying on registration form 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