Support

Home Forums Event Espresso Premium Ajax Notices Before and using FHEE__EE_Front_Controller__display_errors

Ajax Notices Before and using FHEE__EE_Front_Controller__display_errors

Posted: November 6, 2017 at 10:36 am

Viewing 3 reply threads


raffy

November 6, 2017 at 10:36 am

Hi!

This appears before my <html> tag when you view source:

<div id=”espresso-notices”></div>
<div id=”espresso-ajax-loading” style=”display:none;”>
<span class=”ee-spinner ee-spin”></span><span style=”display:none;”>loading…</span>
</div>

<div id=”espresso-ajax-notices”>

<div id=”espresso-ajax-notices-success” class=”espresso-ajax-notices success fade-away” style=”display:none;”>
<span class=”dashicons dashicons-no”></span>
<p class=”espresso-notices-msg”></p>
</div>

<div id=”espresso-ajax-notices-attention” class=”espresso-ajax-notices attention fade-away” style=”display:none;”>
<span class=”dashicons dashicons-no”></span>
<p class=”espresso-notices-msg”></p>
</div>

<div id=”espresso-ajax-notices-error” class=”espresso-ajax-notices error fade-away” style=”display:none;”>
<span class=”dashicons dashicons-no”></span>
<p class=”espresso-notices-msg”></p>
</div>

</div>

When you check with the browser developer tools, this block appears after the head block somehow bringing most of the content found between <head></head>.

This block of code appears in the multisite home pages not just in the event espresso pages. This prevents me from setting up og:tags and the like.

1) How do I fix this and stop it from appearing ahead of <html>? Where is it suppose to appear?

Taking a cue from Remove Popups during checkout, I added

add_filter( ‘FHEE__EE_Front_Controller__display_errors’, ‘__return_false’ );

to a custom function.php file.

2) Can I safely have this filter on for all pages? What do front end users lose other than a notification if fields in the registration form are not properly filled up?


raffy

November 6, 2017 at 10:42 am

I am using
twig/timber template from RocketThemes
wordpress 4.8.3
ee 4.9.49.p


Tony

  • Support Staff

November 7, 2017 at 6:34 am

1) How do I fix this and stop it from appearing ahead of ? Where is it suppose to appear?

Its hooked into the ‘loop_stat’ hook: https://developer.wordpress.org/reference/hooks/loop_start/

If your getting output before the HTML tags it’s usually a good indication that the theme or a plugin is running the loop before its expected.

To find out which it is, you can try the troubleshooting steps here:

https://eventespresso.com/wiki/troubleshooting-checklist/

2) Can I safely have this filter on for all pages? What do front end users lose other than a notification if fields in the registration form are not properly filled up?

I would not usually say you can ‘safely’ removing all notices from all EE pages, the notices are used throughout the checkout process to show issues with the registrations, transactions, payments and so on.

Removing them won’t actually break anything, but if there is an error and use input is needed they may not know about it as the notice is available.


raffy

November 8, 2017 at 12:25 am

I’ll work on troubleshooting.

In the meantime, I understand nothing is broken but I should seriously consider impact on UX.

Thanks again, Tony!

Viewing 3 reply threads

The support post ‘Ajax Notices Before and using FHEE__EE_Front_Controller__display_errors’ 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