WordPress.org

Ready to get started?Download WordPress

Forums

Comment Extra Fields
Breaks admin area (7 posts)

  1. Jeremy Olsen
    Member
    Posted 2 years ago #

    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/

  2. jworker
    Member
    Posted 2 years ago #

    Hi,

    the same here with wp 3.3

  3. eqhes
    Member
    Posted 2 years ago #

    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:
      if(!isset($_POST['action'])) :
      ?>
      
      <script type="text/javascript">
          var plugin_url = "<?php echo CEF_FULL_PLUGIN_PATH;?>";
      </script>
      <?php endif;

      You should replace that with this:

      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;
    3. 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:
      <?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 :)

  4. SimonaIlie
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  5. mslater88
    Member
    Posted 2 years ago #

    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!

  6. SimonaIlie
    Member
    Plugin Author

    Posted 2 years ago #

    You welcome :)

  7. transom
    Member
    Posted 2 years ago #

    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($){

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic