• Resolved sbueffel

    (@sbueffel)


    Using latest version of plugin with WP 2.8.2 on IIS7, but it happened when on 2.7.1, too. Activates fine, search for book fine. When I add the book (via Use this result) I get a sql error:

    WordPress database error Field ‘b_review’ doesn’t have a default value for query

    I have manually tried to change the parameters of the field but I can’t reconfigure it to have a default. So I deactivated it and reactivated it again…this time I got duplicate key errors, but the activation was successful. Still not go adding a book.

    So I deleted the plugin and manually removed the tables from the database. I downloaded the plugin again, activated it (no errors). Still same error adding a book.

    This is the full error returned:
    INSERT INTO wp_now_reading
    (b_author, b_title, b_image, b_asin, b_added, b_status, b_nice_title, b_nice_author, b_reader)
    VALUES(‘Daniel J. Levitin’, ‘This Is Your Brain on Music: The Science of a Human Obsession’, ‘https://ecx.images-amazon.com/images/I/51RBMD235NL._SL160_.jpg’, ‘0525949690’, ‘2009-07-29 17:05:56’, ‘unread’, ‘this-is-your-brain-on-music-the-science-of-a-human-obsession’, ‘daniel-j-levitin’, ‘3’)
    made by add_book, update_book

    Scott

Viewing 3 replies - 1 through 3 (of 3 total)
  • Scott,

    I just released 5.0.3.2. Try updating and let me know if it fixes your issue.

    Thread Starter sbueffel

    (@sbueffel)

    The upgrade failed because it couldn’t remove the old plugin. So I deleted it from within WP, then dropped the tables. I downloaded 5.0.3.2 and when I activated it, I get an error related the same field as before. This time it is a little different because I didn’t get an error when installing previous versions, only when adding a book. This time it errors upon activation:

    WordPress database error BLOB/TEXT column ‘b_review’ can’t have a default value for query
    CREATE TABLE wp_now_reading (
    b_id bigint(20) NOT NULL auto_increment,
    b_added datetime NOT NULL default ‘0000-00-00 00:00:00’,
    b_started datetime NOT NULL default ‘0000-00-00 00:00:00’,
    b_finished datetime NOT NULL default ‘0000-00-00 00:00:00’,
    b_title VARCHAR(100) NOT NULL default ”,
    b_nice_title VARCHAR(100) NOT NULL default ”,
    b_author VARCHAR(100) NOT NULL default ”,
    b_nice_author VARCHAR(100) NOT NULL default ”,
    b_image text NOT NULL,
    b_asin varchar(12) NOT NULL default ”,
    b_status VARCHAR(8) NOT NULL default ‘read’,
    b_rating tinyint(4) NOT NULL default ‘0’,
    b_review text NOT NULL default ”,
    b_post bigint(20) NOT NULL default ‘0’,
    b_reader tinyint(4) NOT NULL default ‘1’,
    PRIMARY KEY (b_id),
    INDEX permalink (b_nice_author, b_nice_title),
    INDEX title (b_title),
    INDEX author (b_author)
    ) made by activate_plugin, do_action, call_user_func_array, nr_install, dbDelta
    WordPress database error Table ‘sidefumbling.wp_now_reading’ doesn’t exist for query
    SELECT
    b_id AS id, b_title AS title, b_author AS author
    FROM
    wp_now_reading
    WHERE
    b_nice_title = ” OR b_nice_author = ”
    made by activate_plugin, do_action, call_user_func_array, nr_install

    Thread Starter sbueffel

    (@sbueffel)

    I don’t know why I didn’t Google it before, but the first hit describes the problem. I am running MySQL in Win2008. I guess MySQL on Windows and Linux are slightly different. The query should be as follows:

    b_review text NOT NULL,

    instead of

    b_review text NOT NULL default ”,

    I will see if I can find your creation script in the directory and make the change myself. You may want to address this in your next update.

    Thanks,

    Scott

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Now Reading Reloaded] Cannot add new books because of db error’ is closed to new replies.