Title: Error: function theChampLoadEvent
Last modified: May 11, 2018

---

# Error: function theChampLoadEvent

 *  [Vitor](https://wordpress.org/support/users/mlvitor/)
 * (@mlvitor)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/)
 * Trying to translate a Woocommerce string using Loco Translate and I get this 
   error message:
    — Error: function theChampLoadEvent(e){var t=window.onload;if(
   typeof window.onload!=”function”){window.onload=e}else{window.onload=function(){
   t();e()}}}. Check console output for debugging information — Any idea why is 
   this happening?
 * Regards,

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10269864)
 * Because a badly behaved plugin is breaking Ajax functions by printing code out
   when it shouldn’t.
 * What plugin/theme does theChampLoadEvent functionality come from? It should be
   reported to them as a bug and is a very easy one to fix.
 *  Thread Starter [Vitor](https://wordpress.org/support/users/mlvitor/)
 * (@mlvitor)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10270463)
 * Hi Tim,
 * Thank you very much for your reply.
 * As far as I could understand, Super Socializer plugin is the only one using this“
   theChampLoadEvent” function, so maybe it is the bad one.
 * I am using Loco Translate 2.1.3 and Super Socializer 7.11.11.
 * [https://wordpress.org/plugins/super-socializer/](https://wordpress.org/plugins/super-socializer/)
 * Regards,
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10270541)
 * I’ve installed the plugin producing the output and it appears to be fine on my
   system during Ajax operations. So not pointing the finger just yet.
 * It’s possible that something else is forcing a normal web page to render instead
   of the Ajax response. Can you please post what you see on the diagnostics page
   at Loco Translate > Settings > Debug ?
 *  Thread Starter [Vitor](https://wordpress.org/support/users/mlvitor/)
 * (@mlvitor)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10270833)
 * Hard to find without the WP_DEBUG set to true 🙂
    — Versions Loco Translate: 
   2.1.3 WordPress: 4.9.5 PHP: 7.0.30 (cgi-fcgi) Server: Apache Unicode UTF-8 rendering:
   ΟΚ ✓ Multibyte support: Yes Ajax Endpoint: /wp-admin/admin-ajax.php JSON decoding:
   ΟΚ ✓ Ajax test result: ΟΚ ✓ Limits WP_MEMORY_LIMIT: 40 MB WP_MAX_MEMORY_LIMIT:
   256 MB PHP memory_limit: 256 MB PHP post_max_size: 8 MB PHP max_execution_time:
   30 Filesystem Custom languages directory: wp-content/languages/loco Directory
   writable: Yes File mods disallowed: No File mod safety level: Warn Debug settings
   WP_DEBUG: On WP_DEBUG_LOG: Off WP_DEBUG_DISPLAY: On PHP display_errors: On PHP
   log_errors: On PHP error_log: error_log —
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10270923)
 * Thanks. Well the Ajax test is fine, so I think something is blocking the specific
   operation on your WooCommerce file. Possibly some security software.
 * Can you use your network inspector and see what the actual page being rendered
   looks like? Example: [https://localise.biz/wordpress/plugin/faqs/ajax-errors#debug](https://localise.biz/wordpress/plugin/faqs/ajax-errors#debug)
 *  Thread Starter [Vitor](https://wordpress.org/support/users/mlvitor/)
 * (@mlvitor)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10271160)
 * Sorry this is going far away…
    As much as I understand, admin-ajax.php is called
   several times and sometimes it returns 404 status. If I disable Super Socializer,
   the error changes to: — Error: (window.gaDevIds=window.gaDevIds||[]).push(‘5CDcaG’);—
   And its impossible to save Woocommerce custom translation as well.
 * I tryed to translate other plugin using custom translation and it worked.
 * I deleted the custom Woocommerce translation and tryed to translate the original
   file and the error changes to:
    — Error: Notice: Trying to get property of non-
   object. — No hope 🙁
 *  [Heateor Support](https://wordpress.org/support/users/heateor/)
 * (@heateor)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10272276)
 * [@timwhitlock](https://wordpress.org/support/users/timwhitlock/)
 * > Because a badly behaved plugin is breaking Ajax functions by printing code 
   > out when it shouldn’t.
   >  What plugin/theme does theChampLoadEvent functionality
   > come from? It should be reported to them as a bug and is a very easy one to
   > fix.
 * This is the Javascript code our plugin prints in the HTML source of the webpages
   to get the plugin working.
    FYI, when you see some Javascript/HTML code being
   rendered as response of an AJAX request, it doesn’t mean that the plugin to which
   the code being rendered belongs is breaking the AJAX request. It means there 
   is something wrong with that AJAX request. That request is not successful and
   that’s why it is returning/outputting the HTML code of the website.
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10272775)
 * [@heateor](https://wordpress.org/support/users/heateor/) I clarified that in 
   my [second comment](https://wordpress.org/support/topic/error-function-thechamploadevent/?output_format=md#post-10270541)
   after investigating. Your plugin is not at fault – but as you say – _something_
   is causing a page to be rendered when it shouldn’t, hence something is badly 
   behaved.
 * [@mlvitor](https://wordpress.org/support/users/mlvitor/) I still need to see 
   the full output from your network inspector preview pane, like in my example.
   I still think the most likely cause is security software blocking the request.
 *  Thread Starter [Vitor](https://wordpress.org/support/users/mlvitor/)
 * (@mlvitor)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10273631)
 * So far, I don’t have security software active. The full output of network inspector
   of which file?
 * The error only happens when I try to translate the Portuguese version.
    Portuguese(
   Portugal) (pt_PT) – Last updated 2018-05-07 16:44:26 for version 3.3.5 [https://translate.wordpress.org/projects/wp-plugins/woocommerce/language-packs](https://translate.wordpress.org/projects/wp-plugins/woocommerce/language-packs)
 * After deleting previous files and uploading the PO & MO files again to “/wp-content/
   languages/loco/plugins” and trying to edit pt_PT custom translation again I get
   the error:
    — Error: Notice: Trying to get property of non-object. Check console
   output for debugging information. — Deactivating the “Simple Google Map” the 
   error above changes back to: — function theChampLoadEvent(e){var t=window.onload;
   if(typeof window.onload!=”function”){window.onload=e}else{window.onload=function(){
   t();e()}}}. — Deacivating the “Super Socializer” the error changes to: — Error:(
   window.gaDevIds=window.gaDevIds||[]).push(‘5CDcaG’); — The more I dig… worse.
   Is there any chance to the main cause of the errors be related to something wrong
   with the MO/PO files?
 * When I create and translate a custom English UK version, for instance, all works
   fine.
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10273661)
 * > So far, I don’t have security software active.
 * Some hosting providers may install a web application firewall without your realizing,
   but if you say there’s nothing then let’s forget about that.
 * > The full output of network inspector of which file?
 * Of the Ajax request that is causing the problem. It will show up as you click“
   save” which is (I assume) the action showing the errors?
 * > Error: Notice: Trying to get property of non-object.
 * With WP_DEBUG enabled you might see these coming from all over your site. If 
   this is coming from my plugin please tell me, but I suspect it’s a red herring.
 * The changes in “error message” as you enable/disable things all seem irrelevant.
   That text you see is just the part of the web page being rendered when no web
   page should be rendered at all. It is seeing that web page that I’m trying to
   get to.
 * > Is there any chance to the main cause of the errors be related to something
   > wrong with the MO/PO files?
 * I have no problem with the PO/MO files you linked to.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Error: function theChampLoadEvent’ is closed to new replies.

 * ![](https://ps.w.org/loco-translate/assets/icon-256x256.png?rev=1000676)
 * [Loco Translate](https://wordpress.org/plugins/loco-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/loco-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/loco-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/loco-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/loco-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/loco-translate/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/error-function-thechamploadevent/#post-10273661)
 * Status: not resolved