The MU forums have moved to WordPress.org

Plugins causing WordPress to break (6 posts)

  1. stephxwerx
    Member
    Posted 16 years ago #

    I'm having a very frustrating recurring problem with WordPress MU. I've created a plugin to pull specific information from the wpdb and wrap it in html tags. However, adding any plugin, be it my own or one from the wordpress mu plugins page, it causes certain processes to break in WordPress MU's admin side.

    For example, when I try to publish a post, I can fill out the details but when I hit Publish, I get the dreaded white screen.

    The blog itself displays perfectly, just the admin side that seems to be affected. What's going wrong?!

  2. drmiketemp
    Member
    Posted 16 years ago #

    A lot more details are needed here. Heck, just the name of the plugin you're using and a link to it's homepage would be a start. How about a check of your webserver's error logs, the version of wpmu you're using, a link to your install, which editor you're using, what browser and version you're using, is there anything in the output when you look at your browser's view source when you get the white screen, etc.?

  3. drmiketemp
    Member
    Posted 16 years ago #

  4. stephxwerx
    Member
    Posted 16 years ago #

    <?php

    function showPostTitle($bid){
    global $wpdb;
    $mywordlimit = 6;
    $postTitle = $wpdb->get_var("SELECT post_title FROM " . "wp_" . $bid . "_posts" . " WHERE post_type = 'post' ORDER BY post_date_gmt DESC");
    //add a limit on the word count
    //echo strip_tags(list_all_posts_summary($postTitle, $mywordlimit));
    echo $postTitle;
    }

    function showPostDate($bid){
    global $wpdb;
    $postDate = $wpdb->get_var("SELECT post_date FROM " . "wp_" . $bid . "_posts" . " WHERE post_type = 'post' ORDER BY post_date_gmt DESC");
    echo $postDate;
    }

    function showPostSummary($bid){
    global $wpdb;
    $mywordlimit = 22;
    $postContent = $wpdb->get_var("SELECT post_content FROM " . "wp_" . $bid . "_posts" . " WHERE post_type = 'post' ORDER BY post_date_gmt DESC");
    //add a limit on the word count
    echo strip_tags(list_all_posts_summary($postContent, $mywordlimit));
    }

    function showPostPermalink($bid){
    global $wpdb;
    $postPermalink = $wpdb->get_var("SELECT option_value FROM " . "wp_" . $bid . "_options" . " WHERE option_name = 'siteurl'");
    $myPermalink = $wpdb->get_var("SELECT id FROM " . "wp_" . $bid . "_posts" . " WHERE post_type = 'post' ORDER BY post_date_gmt DESC");

    echo get_permalink($myPermalink);

    }

    ?>

    <?php
    function showGetALife(){
    global $wpdb;
    $bid = "wp_27_posts";

    $myquery = $wpdb->get_results("SELECT * FROM " . $bid . " WHERE post_type = 'post' ORDER BY post_date_gmt DESC LIMIT 3", ARRAY_A);

    if (is_array($myquery)){
    reset($myquery);
    foreach ($myquery as $row) {
    echo "<h3>".$row[post_title]."</h3>";
    $thepostauthorID = $row[post_author];
    $theauthorID = $row[post_author];
    $thepostauthor = $wpdb->get_var("SELECT user_login FROM wp_users WHERE id=$theauthorID");
    echo "<p class='authorDate'>Posted by ".$thepostauthor." on ".$row[post_date]."</p>";
    echo "<p class='postContent'>".$row[post_content]."</p>";
    $thepostlink = $row[guid];
    echo "<p class='permalink'>Read more »";
    echo "<p class='clearingDiv'>";

    }

    }
    }
    ?>

    This is what I have written myself and added to the Plugins folder, activated it and it generates the content I want on 2 separate pages. I'm a total novice at this so forgive me if I have made a big mess of things.

    WordPress MU 1.0 is installed. http://projectblogger.ie/get-a-life which calls the showGetALife() function is working perfectly but my other page which uses the functions above that, http://projectblogger.ie/test_page has broken at some point today too.

  5. drmiketemp
    Member
    Posted 16 years ago #

    Actually the get a life page isn't working either. Stops on something labeled "Xwerx customisation start #getalife_leftCol" while the other one stops on a top posts listing.

    YOU NEED TO CHECK YOUR WEBSERVER'S ERROR LOGS

  6. stephxwerx
    Member
    Posted 16 years ago #

    I've been checking it and it comes up blank every time

About this Topic

  • Started 16 years ago by stephxwerx
  • Latest reply from stephxwerx