WordPress.org

Ready to get started?Download WordPress

Forums

Cartpauj PM
Site gone into HTTP 500 error after modifying plugin PHP file (7 posts)

  1. Bencuri
    Member
    Posted 11 months ago #

    I have WordPress and BBPress installed, and I added the Cartpauj PM plugin to have a private messaging system on the site. The plugin installed successfully, but I found an unwanted reply form on the botton of the private messages page on the website. So I tried to delete this from one of the PM-CLASS.PHP file of the plugin by removing these lines:

    //SHOW THE REPLY FORM
    $threadOut .= "</table>
    <p>".__("Add Reply", "cartpaujpm").":</p>
    <form name='message' action='".$this->actionURL."checkmessage' method='post'>".
    $this->get_form_buttons()."
    <textarea name='message_content'></textarea>
    <input type='hidden' name='message_to' value='".$this->convertToUser($to)."' />
    <input type='hidden' name='message_title' value='".$re.$message_title."' />
    <input type='hidden' name='message_from' value='".$user_ID."' />
    <input type='hidden' name='message_date' value='".current_time('mysql', $gmt = 1)."' />
    <input type='hidden' name='parent_id' value='".$pID."' />
    <input type='submit' onClick='this.disabled=true;this.form.submit();' value='".__("Send Message", "cartpaujpm")."' />
    </form>";

    Now the whole site is gone, that is odd, because even the admin dashboard is unaccessible. I wonder how this is possible when the PM messages plugin only adds a separate page in my website, it doesn't even add to the frontpage, but even the dashboard is gone.

    http://wordpress.org/plugins/cartpauj-pm/

  2. cartpauj
    Member
    Plugin Author

    Posted 11 months ago #

    Delete the plugin folder using FTP, then re-install the plugin.

  3. Bencuri
    Member
    Posted 11 months ago #

    It worked.

    But how can I remove the reply form from the bottom of the Messages page? When I install the plugin, it created a page which has a box at the buttom, the title is: Leave a Reply. It seems to me it has nothing to do with the messages, I actually don't know what that is for, I think it has something to do with WordPress. The message bos for private messages appears above it, it works, so this is a different thing. How can I disable that Leave a Reply box?

  4. cartpauj
    Member
    Plugin Author

    Posted 11 months ago #

    How did you edit the file? Usually 500 errors are caused by a permissions issue on the file. So chances are you're editing it or uploading the file after it's been edited as a user on the server who does not have apache rights. Probably doesn't make any sense haha, but I'm guessing that's what happened. There's probably nothing wrong with your edits, but rather, the way your uploading or saving the file after you edit it.

  5. Bencuri
    Member
    Posted 11 months ago #

    I went inside editor, and deleted the part you can see in the first post here, and saved the file. I wanted to delete that Leave a Reply box. So how can you remove it anyway?

  6. Bencuri
    Member
    Posted 11 months ago #

    By the way the site is back now, I reinstalled the plugin, it works.

  7. cartpauj
    Member
    Plugin Author

    Posted 11 months ago #

    Delete this:

    $threadOut .= "</table>
    <p>".__("Add Reply", "cartpaujpm").":</p>
    <form name='message' action='".$this->actionURL."checkmessage' method='post'>".
    $this->get_form_buttons()."
    <textarea name='message_content'></textarea>
    <input type='hidden' name='message_to' value='".$this->convertToUser($to)."' />
    <input type='hidden' name='message_title' value='".$re.$message_title."' />
    <input type='hidden' name='message_from' value='".$user_ID."' />
    <input type='hidden' name='message_date' value='".current_time('mysql', $gmt = 1)."' />
    <input type='hidden' name='parent_id' value='".$pID."' />
    <input type='submit' onClick='this.disabled=true;this.form.submit();' value='".__("Send Message", "cartpaujpm")."' />
    </form>";

    Replace with this:

    $threadOut .= "</table>"

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.