• 1
    Subject: blog: test email
    Content-type: text/plain, boundary:
    Raw content:
    [user]:[pw]
    testing blogging via email!
    ___
    blah
    Login: [user], Pass: [pw]
    SQL/DB Error:
    [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘)’ at line 1]
    INSERT INTO wp_posts (post_author, post_date, post_content, post_title, post_category) VALUES (2, ‘2004-03-16 10:10:59’, ‘testing blogging via email!’, ‘test email’, )
    Posted title: test email
    Posted content:
    testing blogging via email!
    SQL/DB Error:
    [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1]
    SELECT * FROM wp_post2cat WHERE post_id = 0 AND category_id =
    Mission complete, message 1 deleted.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jesterz

    (@jesterz)

    OOPS!! I hit “enter” too early. How about a description of my problem? ??
    As you can see above, I’m having some SQL issues. It seems that no category is getting passed in to the SQL statements. I’ve got the latest WordPress (d/led yesterday, so it’s v1.0.2). I’ve currently got three categories, so I don’t know why it’s not picking them up. Any help would be GREATLY appreciated.
    Thanks, and sorry for using two posts for this problem.
    -J

    Take a look at: This thread. It should solve your Category issue.
    -Rob

    There is a couple of issues here.
    1. The default wp-mail.php uses Pop3, which is pretty standard for most.
    Rob’s version 1.1 and 1.0 at: https://rob.thesnows.org/ uses Imap, and this may be harder to setup for most.
    This version fixes the category problem, but needs Imap support.
    2. the default category (i checked in the DB) is ZERO, NOT 1! This is very important because if you only have 1 category the options menu defaults to 1.
    I advise changing your wp-mail.php to put a $post_category= ‘0’; inside this for loop AND at the beginning of the file
    foreach ($post_categories as $post_category) {
    // Double check it’s not there already
    //pmm hack 3-18-04
    $post_category= ‘0’;

    This is what I changed in wp-mail.php to get posting by email to work for me (in 1.0.2, this is):
    Replace
    $post_categories[] = xmlrpc_getpostcategory($content);
    with
    $post_categories = array(‘1’);
    at line 212. It forces all email posts to the General category, but at least they show up.
    Replace $post_category with 0 in the two “INSERT INTO $tableposts …” queries (lines 226 & 228).
    (If I were industrious, I’d create a new category for posts-by-email, and use that instead of ‘1’. If I were really industrious, I’d figure out what xmlrpc_getpostcategory() is returning, and why wp-mail.php doesn’t like it. Alas for me, I’m lazy.)

    sufehmi

    (@sufehmi)

    hmm.. I’ve hacked wp-mail.php and forces it to assign 2 to $post_category, but posts by email still won’t show up.
    Strangely, I can edit them on the admin console….
    Any ideas ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Email Blog – No Category??’ is closed to new replies.