[Plugin: DMSGuestbook] Plugin doesn't play nice with other plugins (2 posts)

  1. In the DMSGuestbook plugin, your filter that you hook to the_content is doing the wrong thing.

    Here: http://plugins.trac.wordpress.org/browser/dmsguestbook/tags/1.15.3/admin.php#L3069

    A filter should never output anything with echo, it should only return the modified content as a string. The actual the_content function does the echoing.

    So when you do this:

    echo $content;
    $post_id = get_post($page_id);
    if ($_COOKIE['wp-postpass_' . COOKIEHASH] == $post_id->post_password || $post_id->post_password == "") {
    include_once ("dmsguestbook.php");

    You break the guestbook page *if* any other plugin exists that also modifies the_content and which happens to run after your plugin.

    You need to modify this function to only change the value of $content and then to return that value. If you echo here, then things break.


  2. DanielSchurter
    Posted 6 years ago #

    This problem has been solved in 1.15.4
    Thank you Otto for your help.


Topic Closed

This topic has been closed to new replies.

About this Topic