Header Errors for IE
-
The script will clash with other scripts using jquery in the following circumstance:
– cevhershare is disabled for a page/post
Cause:
The plugin’s header function will add the script’s init to the header regardless of whether cevhershare is enabled or not. On a page where cevhershare is disabled, IE will give a warning message indicating that on line 27 of cevhershare.js, offset().top is null or that the object is undefined. Depending on your browser settings, this error will prevent further processing of scripts.
Fix:
The fix is to ensure that cevhershare does not add the init script to the header for a page/post that has cevhershare disabled.
Find the following line in cevhershare.php:
if(function_exists('wp_enqueue_script') && (is_single() || is_page())) {
Replace the above line with:
if(function_exists('wp_enqueue_script') && (is_single() || get_post_custom_values('sharebar'))) {
The fix instructs cevhershare to insert the init code into the header only if it is a single post or if a custom field of “sharebar” is set to true for the page/post. You can play around with the conditional statement to obtain the desired result. Of course, this is only a quick fix. If you need additional customization, it would take a bit more modding of the code.
- The topic ‘Header Errors for IE’ is closed to new replies.