Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Running WordPress on IIS I have had the same problem.

    The exact fix (which is not very clean, but works for me) is:

    File: /wp-google-maps/wpGoogleMaps.php
    Line: 2349-2352
    Code:

    /* 6.0.32 - checked for beginning slash, but not on local host */
    if ((isset($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_ADDR'] == "127.0.0.1") || (isset($_SERVER['LOCAL_ADDR']) && $_SERVER['LOCAL_ADDR'] == "127.0.0.1")) { } else {
        if (substr($file, 0, 1) != "/") { $file = "/".$file; }
    }

    As you can see on line 2351 it checks for the path having to start with a slash (/).

    So I changed line 2351 from:
    if (substr($file, 0, 1) != "/") { $file = "/".$file; }

    To:
    if (DIRECTORY_SEPARATOR == "/" && substr($file, 0, 1) != "/") { $file = "/".$file; }

    And everything works as planned.

    Correction:

    The clean solution should be:

    echo "<div class=\"socialmedia-text\">" . $text . "</div>";

    I forgot to close the class attribute in my post above.

    Notice: Undefined index: filter in \wp-content\plugins\social-media-widget\social-widget.php on line 443 in version 4.0.2.

    This error occurs because the code that causes the error is borrowed from the WordPress Text widget. It’s the checkbox that says “Automatically add paragraphs” which (like the checkbox says) automaticly adds paragraphs to the text.

    However the checkbox was not borrowed, so like Twanneman stated changing the code on line 443 of \wp-content\plugins\social-media-widget\social-widget.php to:

    echo "<div class=\"socialmedia-text\>" . $text . "</div>";

    is the cleanest solution.

    Note to the plugin developer:
    The code for the form of the “Automatically add paragraphs” checkbox (in WordPress 3.9.1) can be found in \wp-includes\default-widgets.php on line 528:

    <p><input id="<?php echo $this->get_field_id('filter'); ?>" name="<?php echo $this->get_field_name('filter'); ?>" type="checkbox" <?php checked(isset($instance['filter']) ? $instance['filter'] : 0); ?> /> <label for="<?php echo $this->get_field_id('filter'); ?>"><?php _e('Automatically add paragraphs'); ?></label></p>

    and the code to save the value can be found on line 514 of the same file (\wp-includes\default-widgets.php):

    $instance['filter'] = isset($new_instance['filter']);

    Please update this plugin, because we use it regularly.

    Thanks in advance! 🙂

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