• Hi,

    I’ve got a problem when adding banners to the site I am working on. Currently I’m running on localhost (as it’s in development).

    When I try to ad a banner it says it added it, but the banner doesn’t appear in the banner list. When I check my wp error logs, it says…

    WordPress database error Field 'banner_edited_by' doesn't have a default value for query INSERT INTOghsdu_useful_banner_manager_banners(banner_name,banner_type,banner_title,banner_alt,banner_link,link_target,link_rel,banner_width,banner_height,added_date,active_until,banner_order,wrapper_id,wrapper_class,is_visible,banner_added_by) VALUES ('ecs','png','East Coast Sports','East Cost Sports Topsail, NC','https://eastcoastsports.com/','_blank','dofollow','200','137','2014-04-08','-1','0','','atwkslider','yes','kmt-admin') made by include('C:\inetpub\wwwroot\RaleighKMT\wp-content\plugins\useful-banner-manager\useful-banner-manager-banners.php'), useful_banner_manager_add_banner

    It appears it’s looking for a default value for the ‘banner_edited_by’ field, and it just doesn’t exist in the DB.

    I’m running:
    Wordpress 3.8.2
    XAMPP 1.8.2
    Windows 8.1 64 bit.
    PHP 5.4.25
    MySQL 5.6

    I can easily add a default value to that column, but I haven’t seen this error listed here or anywhere on Google, so I’m assuming that I’ve configured something wrong. Any help you can provide is appreciated. Thanks!

    — jason fant

    https://www.ads-software.com/plugins/useful-banner-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter GreatBigTuna

    (@greatbigtuna)

    Digging a little deeper. I found that neither the banner_edited_by or banner_edited_date columns allow nulls. Also, since banner_edited_by is a TEXT column, you can’t assign a default value anyway.

    I’ve changed both of those columns to accept nulls in the DB and I can add all the banners I want now.

    Not sure why everybody else isn’t having this issue, perhaps it’s an idiosyncrasy of MySQL on Windows (and believe me, there are quite a few), but you might want to take a look at it in case you have someone else run into the problem.

    Thanks

    — jason

    Hello GreatBigTuna,

    I’m going to try reproduce the error and fix it.

    Thanks by the report.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Database error when adding Banner’ is closed to new replies.