Title: [Plugin: Comment Extra Fields] Breaks admin area
Last modified: August 20, 2016

---

# [Plugin: Comment Extra Fields] Breaks admin area

 *  [Jeremy Olsen](https://wordpress.org/support/users/jeremy-olsen/)
 * (@jeremy-olsen)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/)
 * It breaks the menu behaviors in the admin area, I was fine with this until I 
   realized I could not edit my sidebar widgets any longer.
 * [http://wordpress.org/extend/plugins/comment-extra-field/](http://wordpress.org/extend/plugins/comment-extra-field/)

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

 *  [jworker](https://wordpress.org/support/users/jworker/)
 * (@jworker)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/#post-2414971)
 * Hi,
 * the same here with wp 3.3
 *  [eqhes](https://wordpress.org/support/users/davidcs66/)
 * (@davidcs66)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/#post-2414979)
 * Hi,
 * I have not tested the plugin in WP 3.3, just on 3.2.1, but I found a bug that
   may affect you.
 * The problem: some javascript is output out of context, so we can find it above
   the RSS feed or the theme HTML output breaking them -they don’t validate-, for
   example.
 * The solution: put the javascript in context. How?
    1. Look into the plugins folder and open there the comment-extra-fields.php
    2. Between the lines 58 and 64 you will find the next code:
    3.     ```
           if(!isset($_POST['action'])) :
           ?>
       
           <script type="text/javascript">
               var plugin_url = "<?php echo CEF_FULL_PLUGIN_PATH;?>";
           </script>
           <?php endif;
           ```
       
    4. You should replace that with this:
    5.     ```
           if(!isset($_POST['action'])) :
               	wp_enqueue_script('comment-extra-fields-js-php-scripts', CEF_FULL_PLUGIN_PATH . 'js/scripts.php?cef_full_plugin_path='.urlencode(CEF_FULL_PLUGIN_PATH));
           	endif;
           ```
       
    6. Now, create a file in the “js” folder that is in the plugins one. This file 
       should be named “scripts.php” and contain this code:
    7.     ```
           <?php
           $cef_full_plugin_path = urldecode($_GET['cef_full_plugin_path']);
           ?>
           var plugin_url = "<?php echo $cef_full_plugin_path;?>";
           ```
       
 * All done! It seems that everything is working fine now 🙂
 *  Plugin Author [SimonaIlie](https://wordpress.org/support/users/simonailie/)
 * (@simonailie)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/#post-2414982)
 * thank you for your feedback
    released a new version (1.5) in which I removed 
   the tooltips javascript (now, when you click the information icon the text is
   displayed above the add/edit form), implemented the suggested solution for js
   variable and added a new field (Where) to show fields on defined custom post 
   types.
 *  [mslater88](https://wordpress.org/support/users/mslater88/)
 * (@mslater88)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/#post-2414983)
 * I’d just like to say that I contacted this developer today and the support I 
   received has been AWESOME, thanks for this great plugin AND the support Simonallie!
 *  Plugin Author [SimonaIlie](https://wordpress.org/support/users/simonailie/)
 * (@simonailie)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/#post-2414986)
 * You welcome 🙂
 *  [transom](https://wordpress.org/support/users/transom/)
 * (@transom)
 * [14 years ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/#post-2415000)
 * Working with a client today, I found a javascript bug in scripts.js that kept
   another plugin from working in the backend.
 * It was reporting:
    Uncaught TypeError: Property ‘$’ of object [object Window]
   is not a function The issue is with: var $ = jQuery.noConflict(); $(document).
   ready(function(){
 * a better way to do this (and fixes the issue)
    jQuery(document).ready(function(
   $){

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

The topic ‘[Plugin: Comment Extra Fields] Breaks admin area’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/comment-extra-field.svg)
 * [Comment Extra Fields](https://wordpress.org/plugins/comment-extra-field/)
 * [Support Threads](https://wordpress.org/support/plugin/comment-extra-field/)
 * [Active Topics](https://wordpress.org/support/plugin/comment-extra-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/comment-extra-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/comment-extra-field/reviews/)

 * 6 replies
 * 6 participants
 * Last reply from: [transom](https://wordpress.org/support/users/transom/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-comment-extra-fields-breaks-admin-area/#post-2415000)
 * Status: not resolved