Forums

WP Bannerize
[resolved] Error uploading image to wp-bannerize (5 posts)

  1. sulfurito
    Member
    Posted 7 months ago #

    I had this error when uploading an image from local:

    WordPress database error: [Field 'free_html' doesn't have a default value]
    INSERT INTO <code>wp_bannerize</code> (<code>banner_type</code>,<code>group</code>,<code>description</code>,<code>use_description</code>,<code>url</code>,<code>filename</code>,<code>target</code>,<code>nofollow</code>,<code>mime</code>,<code>realpath</code>,<code>width</code>,<code>height</code>,<code>start_date</code>,<code>end_date</code>,<code>maximpressions</code>) VALUES ('1','group','','0','http://www.lalunademadrid.es/','http://localhost:8082/asociacionlara/wp-content/uploads/2011/10/la-luna-de-madrid1.jpg','_blank','1','image/jpeg','C:\\Inetpub2\\wwwroot\\asociacionlara/wp-content/uploads/2011/10/la-luna-de-madrid1.jpg','252','200','0000-00-00 00:00:00','0000-00-00 00:00:00','0')

    http://wordpress.org/extend/plugins/wp-bannerize/

  2. gfazioli
    Member
    Posted 7 months ago #

    Hi sulfurito,
    this error appear only on Windows IIS :)

    I Fix it asap

    thanks for report
    GF

  3. gfazioli
    Member
    Posted 7 months ago #

    Forgot,
    when you will install the 3.0.8 revision with this fix, please remember: deactive and re-active the plugin!

    Thx

  4. strato1986
    Member
    Posted 4 months ago #

    i am running version 3.0.50 and still getting the "WordPress database error: [Field 'free_html' doesn't have a default value]" error :( i am on a shared host with IIS. Any help please?

  5. esu66
    Member
    Posted 4 months ago #

    Hi!
    Same thing with apache/mysql in windows.
    When inserting data to table the free_html -field was not assigned any value in functions addBannerFromURL() and addBannerFromLocal().
    adding empty value
    'free_html' => ''
    fixes it.

    Other thing is adding free html banner, there was no value for width and height in addBannerWithFreeHTML().
    That throws an error too.
    I added this after $nofollow = $_POST['nofollow'];

    $dimensions = array ( 0,0 );
    		$mime       = "";
            if ( isset( $_POST['freeHTML'] ) ){
                if  (strstr( $html, ' width=\"' ) ){
                    $w_temp=explode(' width=\"', $_POST['freeHTML'], 1);
                    $w_arr=explode('\"', $w_temp[1], 1);
                    $dimensions[0]=intval($w_arr[0]);
                }
                if  (strstr($html, ' height=\"')){
                    $h_temp=explode(' height=\"', $_POST['freeHTML'], 1);
                    $h_arr=explode('\"', $h_temp[1], 1);
                    $dimensions[1]=intval($h_arr[0]);
                }
            }

    and then this after 'maximpressions' => $_POST['maxImpressions'],

    'mime'            => $mime,
    'width'           => $dimensions[0],
    'height'          => $dimensions[1],

    So that seems to work also.

    Great plugin, thanks for your effort, gfazioli!

    BR, Esu

Reply

You must log in to post.

About this Plugin

About this Topic