TinyPortal

Development => Support => Topic started by: edwardsiow on March 10, 2007, 03:53:48 PM

Title: Fail to add any new block
Post by: edwardsiow on March 10, 2007, 03:53:48 PM
hi,

i have successfully installed tinyportal for smf 1.1.2 and very happy with the result...i installed in my pc (localhost) for testing and learning purpose before really host it....i use apache server, php 5.02 and mySql 7.0...

i have 1 problem...when i try to add a new block, the database error happens...

Out of range value adjusted for column 'var1' at row 1
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf\Sources\TPortalAdmin.php
Line: 223

what is the problem?

second, can i know what is the different between front page block and center block? when i move the existing block to front page block, i can't notice any chances....

thanks for help.....
Title: Re: Fail to add any new block
Post by: IchBin on March 10, 2007, 04:11:31 PM
Try running the manual_tp_install.php to repair your database and see if that helps. Frontpage blocks only show on frontpage stuff. Centerblocks show on frontpage and throughout the forum.
Title: Re: Fail to add any new block
Post by: edwardsiow on March 10, 2007, 04:44:00 PM
i have downloaded this from the link below

http://www.tinyportal.net/index.php?topic=13225.0

and installed...

before i installed, i have reinstall the smf, recreate a new database and done the following steps...

Set all forum contet to DEFAULT settings.

1. Forum uses the SMF DEFAULT CORE theme ONLY!
2. English default language ONLY!
3. dont have any mods

do you means that i still need to do the manual_tp_install.php?
Title: Re: Fail to add any new block
Post by: G6Cad on March 10, 2007, 04:45:45 PM
Always as thats the file that will make all the DB tables and settings for your portal
Title: Re: Fail to add any new block
Post by: edwardsiow on March 10, 2007, 04:56:14 PM
ok...i am trying the steps shown here:

http://www.tinyportal.net/index.php?topic=12118.0

but that's one is for smf1.1.1, does it same for smf1.1.2??
Title: Re: Fail to add any new block
Post by: edwardsiow on March 10, 2007, 05:08:17 PM
after i haved followed the steps in the link below:

HOW TO MANUALLY INSTALL TP V.097 To SMF 1.1.1
http://www.tinyportal.net/index.php?topic=12118.0

the database error as shown as below:

Out of range value adjusted for column 'var1' at row 1
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf\Sources\TPortalAdmin.php
Line: 223

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.1, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.
Title: Re: Fail to add any new block
Post by: edwardsiow on March 10, 2007, 05:14:05 PM
i noticed that after run those steps, my forums version downgraded...

Version Information:
Forum version: SMF 1.1.1
Current SMF version: SMF 1.1.2

anyone can help me?
Title: Re: Fail to add any new block
Post by: edwardsiow on March 10, 2007, 05:29:29 PM
ok...

i restart everything again...i reinstall smf, recreate a new database and use the package manager  to install the file from the following link:

TP 0.9.7.1 for SMF 1.1.2
http://www.tinyportal.net/index.php?topic=13225.0

everythings work fine...but when i try to add new block in the block manager, the database error occured again..

Out of range value adjusted for column 'var1' at row 1
File: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\smf\Sources\TPortalAdmin.php
Line: 223

then i copy the manual_tp_install_0971.php and install it.. the problem still same...

IchBin and G6 please help me....thanks a lot...i will appreciate your kindness..
Title: Re: Fail to add any new block
Post by: edwardsiow on March 11, 2007, 04:33:34 AM
hmm....really nobody know why?

Title: Re: Fail to add any new block
Post by: JPDeni on March 11, 2007, 05:11:16 AM
Let's try something.

In Sources/TPAdmin.php, find the line


db_query("INSERT INTO {$tp_prefix}blocks (type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups) VALUES(5,'theme','-no title-','-no content-','$grps',$newbar,0,1,0,'','','','','')", __FILE__, __LINE__);


Change it to


db_query("INSERT INTO {$tp_prefix}blocks (type,frame,title,body,access,bar,pos,off,visible,var1,var2,lang,access2,editgroups) VALUES(5,'theme','-no title-','-no content-','$grps',$newbar,0,1,0,0,0,'','','')", __FILE__, __LINE__);


It's just changing two of the '' values to being 0.

The default code works fine for me, but there could be something with a different version of MySQL or something.

If it doesn't fix things, put it back the way it was.
Title: Re: Fail to add any new block
Post by: Thurnok on March 11, 2007, 06:00:24 AM
I'd like to know where he got MySQL 7.0.  That would be a neat trick, considering MySQL latest version is 5.x.  I'm apt to believe he meant MS SQL.

Can you clarify Edward?
Title: Re: Fail to add any new block
Post by: edwardsiow on March 11, 2007, 03:55:05 PM
sorry Thurnok...is MySQL 5.0....sorry....

Title: Re: Fail to add any new block
Post by: edwardsiow on March 11, 2007, 03:56:00 PM
few minutes later i will try JPDeni's method....thanks JPDeni....
Title: Re: Fail to add any new block
Post by: edwardsiow on March 11, 2007, 04:29:33 PM
thanks JPDeni!!! it's work!!! while waiting for tp0.98 released, i will play around with this version first....thanks for everybody who help me solve the problems....
Title: Re: Fail to add any new block
Post by: Thurnok on March 12, 2007, 07:18:26 PM
Ah.. hehe.. good deal!  JP Deni to the rescue again.  :)