Link to my site: http://sfx.dontexist.org
SMF version: SMF 2.0 RC3
TP version: TinyPortal 1.0 beta 5.2
Theme name and version: Default Theme
Browser Name and Version: IE 8
Mods installed: No Mods but those automatically installed with TP 1.0 beta 5.2
Related Error messages:
Database Error
Field 'var3' doesn't have a default value
File: C:\Websites\SFX\Sources\TPortalAdmin.php
Line: 2337
I have just installed the latest version of SMF and then installed the latest version of TP, but when I attempt to add a Block, I get the above error. I deleted my database and reinstalled with the same problem. I am using UTF-8, but this has never been an issue with my databases in the past.
Thanks for any attention to this question.
Crashpad,
Welcome to the TP Support site.
Can you clear out your error log and try adding another block with a different browser and see if you still get the error showing up.
Also, I might need to get a look at your site from inside. Can you setup a temp Admin account for me and PM me the details. Don't post the details here, just PM me the following ...
1. Your site url
2. Username
3. Password
ZarPrime
Crashpad,
I've never actually seen the issue that you are having, that being that you can't add any blocks without getting that error, and a couple of others. Your site looks good inside and TP seems to be installed correctly but, for some reason, you just can't add those blocks. I think that you may possibly have either not gotten a correct install of TP, or the database changes weren't performed properly. I did try to look at uninstalling TP and all the tests were successful, but I didn't uninstall it at this time.
However, I am confused about one statement that you made. You said that you are "using UTF-8" but your Forum default language is still English ISO-8859-1. Can you explain to me what you mean by "using UTF-8". Do you mean that you converted "HTML-entities to UTF-8 characters" in Forum Maintenance? If that's what you mean, then your Forum will probably not work correctly until you start using English-UTF-8, which means that you will also need to create English-UTF-8 language file equivalents for your TP Language Files as well.
In the meantime, I am going to discuss the 3 errors that you are getting with the other members of the Team to see if anyone else has ever seen these errors.
ZarPrime
Zar:
Thank you for taking the time to look into this.
I am going to attempt to install the original version of SMF, modify it with TP, set up some blocks, and then upgrade to SMF 2.0RC3 and see what happens.
Thanks again for your efforts on this mod!
Well, LMK what happens and, if you don't really need English UTF-8, why don't you just stick with English.
ZarPrime
I have such a problem: I can not add blocks - transaction ends exactly the same error ..
Fresh install.
SMF 2 rc3
UTF-8 (If installing English ISO-8859-1 is the same error)
TinyPortal 1.0 beta 5.2
Browsers:
FF 3.5.10
IE 8
Jhonam,
It appears that both you and Crashpad had the same 3 errors on your site. I have made a note of these errors. It also appears that you both have one other thing in common. You are both using this on either a Windows Server or you both are using this on a site that you have setup on your local computer. I am going to have to ask Bloc about this and see if he has input on it. Please give me a little time to liaise with him on this and I will see if I can get him here to respond. It may take me a day or so to get an answer.
ZarPrime
Try opening "Sources/TPortalAdmin.php" and find the code:
if(isset($cp))
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups)
VALUES(" . $cp['type'] . ", '" . $cp['frame'] . "', '" . $title . "', '" . htmlentities($cp['body'],ENT_QUOTES) . "','" . $cp['access'] . "',
" . $panel .", 0, 1,1," . $cp['var1'] . "," . $cp['var2'] . ",'" . $cp['lang'] . "','" . $cp['access2'] . "','" . $cp['editgroups'] . "') " , __FILE__, __LINE__);
else
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups)
VALUES(" . $type . ", 'theme', '" . $title . "', '" . htmlentities($body, ENT_QUOTES) . "', '-1,0,1', " . $panel .", 0, 1,1,0,0,'','actio=allpages','') " , __FILE__, __LINE__);
and replace with
if(isset($cp))
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups,var3,var4)
VALUES(" . $cp['type'] . ", '" . $cp['frame'] . "', '" . $title . "', '" . htmlentities($cp['body'],ENT_QUOTES) . "','" . $cp['access'] . "',
" . $panel .", 0, 1,1," . $cp['var1'] . "," . $cp['var2'] . ",'" . $cp['lang'] . "','" . $cp['access2'] . "','" . $cp['editgroups'] . "',0,0) " , __FILE__, __LINE__);
else
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups,var3,var4)
VALUES(" . $type . ", 'theme', '" . $title . "', '" . htmlentities($body, ENT_QUOTES) . "', '-1,0,1', " . $panel .", 0, 1,1,0,0,'','actio=allpages','',0,0) " , __FILE__, __LINE__);
Bloc, thank you for posting this fix. O0 I appreciate it.
Jhonam, after doing the edit that Bloc specifies in his post above, please LMK if things are now working better.
Zarprime
Quote from: bloc on July 12, 2010, 06:26:18 PM
Try opening "Sources/TPortalAdmin.php" and find the code:
if(isset($cp))
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups)
VALUES(" . $cp['type'] . ", '" . $cp['frame'] . "', '" . $title . "', '" . htmlentities($cp['body'],ENT_QUOTES) . "','" . $cp['access'] . "',
" . $panel .", 0, 1,1," . $cp['var1'] . "," . $cp['var2'] . ",'" . $cp['lang'] . "','" . $cp['access2'] . "','" . $cp['editgroups'] . "') " , __FILE__, __LINE__);
else
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups)
VALUES(" . $type . ", 'theme', '" . $title . "', '" . htmlentities($body, ENT_QUOTES) . "', '-1,0,1', " . $panel .", 0, 1,1,0,0,'','actio=allpages','') " , __FILE__, __LINE__);
and replace with
if(isset($cp))
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups,var3,var4)
VALUES(" . $cp['type'] . ", '" . $cp['frame'] . "', '" . $title . "', '" . htmlentities($cp['body'],ENT_QUOTES) . "','" . $cp['access'] . "',
" . $panel .", 0, 1,1," . $cp['var1'] . "," . $cp['var2'] . ",'" . $cp['lang'] . "','" . $cp['access2'] . "','" . $cp['editgroups'] . "',0,0) " , __FILE__, __LINE__);
else
$request = tp_query("INSERT INTO " . $tp_prefix . "blocks
(type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups,var3,var4)
VALUES(" . $type . ", 'theme', '" . $title . "', '" . htmlentities($body, ENT_QUOTES) . "', '-1,0,1', " . $panel .", 0, 1,1,0,0,'','actio=allpages','',0,0) " , __FILE__, __LINE__);
Yes :D very very match))
Great. Topic marked solved. O0
ZarPrime