I get:
Incorrect integer value: '' for column 'category' at row 1
File: C:\apache\htdocs\cebucityforum.com\forum\Sources\TPortalAdmin.php
Line: 463
whenever an admin add an article and forgot to select a category for the article and he click "Save".
Is there a way to set it default from -none- to another category to prevent this?
just solved this own problem for myself
i think its a bug with mysql 5, but not really sure.
goto line 451, find:
$artc=$_POST['tp_article_category'];
replace with
$artc=$_POST['tp_article_category'];
if(empty($artc))
$artc = 0;
also you will need to make this other change so you are able to amend categories
search for
elseif(substr($what,0,19)=='tp_article_category'){
$val=substr($what,19);
if(is_numeric($val) && $val>0)
db_query("UPDATE {$tp_prefix}articles SET category='$value' WHERE id=$val", __FILE__, __LINE__);
$go=3;
}
replace with
elseif(substr($what,0,19)=='tp_article_category'){
$val=substr($what,19);
if(is_numeric($val) && $val>0)
{
if(empty($value))
$value = 0;
db_query("UPDATE {$tp_prefix}articles SET category='$value' WHERE id='$val'", __FILE__, __LINE__);
}
$go=3;
}
Thanks, this will be adressed in TP 0.9.8.
I'm still having the same issue w/9.8.
Fresh Install of SMF 1.1.3 and 9.8 with MySql5
Field 'shortname' doesn't have a default value
File: C:\websites\tdsrnet.com\forums\Sources\TPortalAdmin.php
Line: 463
When trying to create/save a new article.
Quote from: Bloc on March 09, 2007, 12:23:44 AM
Thanks, this will be adressed in TP 0.9.8.
Try this
http://www.tinyportal.net/index.php?topic=14664.0
Please, give the decision of this problem