SimplePortal

Support => Install and Upgrade => Topic started by: hannah.love7 on April 16, 2011, 09:31:50 AM

Title: Database Error After Upgrade to RC5
Post by: hannah.love7 on April 16, 2011, 09:31:50 AM
Database Error
Invalid default value for 'approved'
File: ........../donnaforex.com/httpdocs/forum/Packages/temp/install2.php
Line: 501

I just upgraded my forum from 2.0 RC3 to 2.0 RC5. Before upgrading, i uninstalled Simple Portal. THe upgrade to RC5 went fine, and i reloaded most of my mods with no problem. There are two mods producing the above error, simple portal, and advanced reputation. It shows at the point where it tries to install (after accepting the file changes, the bit where you click continue and it executes the changes).

Sorry to be a pain with so many questions - i probably shouldn't have upgraded and just left RC3 alone since it took so long to make it all work smoothly :)

My forum is www.donnaforex.com/forum
Title: Re: Database Error After Upgrade to RC5
Post by: AngelinaBelle on April 19, 2011, 08:50:13 AM
This odd error occurs on some forums and not on others, following RC5 upgrade.
I've reported this to the tracker (http://simpleportal.net/index.php?issue=415.0 (http://simpleportal.net/index.php?issue=415.0))
If you are upgrading from a recent version of SimplePortal, this workaround should get you going:
http://simpleportal.net/index.php?topic=7646.msg42599#msg42599 (http://simpleportal.net/index.php?topic=7646.msg42599#msg42599)
It just removes the part of the install package where the database gets updated.
If that is not appropriate in your case, please let me know. I can help you work with install2.php.
 
Title: Re: Database Error After Upgrade to RC5
Post by: [SiNaN] on April 19, 2011, 08:57:33 AM
First make this change:

./Settings.php

Code: (Find) [Select]
?>
Code: (Replace) [Select]
$db_show_debug = true;
?>

Then try installing the mod again. It should provide you a more detailed error. If you copy that here for me, I'll have a better idea about what's causing the error.
Title: Re: Database Error After Upgrade to RC5
Post by: hannah.love7 on April 20, 2011, 02:21:51 AM
I tried adding that code and here is the debug info i get:


Invalid default value for 'approved'
File: /var/www/vhosts/donnaforex.com/httpdocs/forum/Packages/temp/install2.php
Line: 501


ALTER TABLE smf_sp_articles
CHANGE COLUMN `approved` `approved` tinyint(2) NOT NULL default ''
Title: Re: Database Error After Upgrade to RC5
Post by: hannah.love7 on April 20, 2011, 02:23:29 AM
I have the same problem on another mod i'm trying to reinstall too, the advanced reputation mod. I installed it manually in the end but cannot run the install.php file and the mod doesn't work correctly as a result.
Will using the workaround mean that parts of simple portal won't work? What does the install file actually do?
Title: Re: Database Error After Upgrade to RC5
Post by: [SiNaN] on April 20, 2011, 08:13:05 AM
I see. You can revert that change back.

I could gave you the changes to fix this for SP, but since you seem to be having the same issue with other mods, this should fix it for all:

Sources/DbPackages-mysql.php

Code: (Find) [Select]
// Allow for unsigned integers (mysql only)
Code: (Replace) [Select]
if ($column_info['default'] === '' && in_array($type, array('int', 'tinyint', 'smallint', 'mediumint', 'bigint')))
$column_info['default'] = 0;

// Allow for unsigned integers (mysql only)
Title: Re: Database Error After Upgrade to RC5
Post by: AngelinaBelle on April 20, 2011, 08:30:20 AM
Thanks for supplying the complete information about your error.
This will help SimplePortal's developers improve the installer.
Currently, some users receive this error message -- some do not.
If you are curious, you can have a look at the install2.php file yourself. SimplePortal's install file makes changes to the database, creating SimplePortal tables if necessary, and updating them if necessary. In your case, though, going from SimplePortal 2.3.2 to 2.3.3 and SMF 2RC3 to 2RC5, I do not think any changes to the SimplePortal tables ought to be necessary. This is why I suggest that skipping install2.php would be an OK way to work around this problem.
If you are having the same problem with another mod, it may be caused by the same problem (related, I think, to changes in SMFs database functions). I cannot tell you if skipping that part of the installation for some other mod will work. It might, or it might be necessary to alter the other mod's install php file to get it working -- I just can't know.
 
Title: Re: Database Error After Upgrade to RC5
Post by: hannah.love7 on April 20, 2011, 12:24:05 PM
Thanks for your replies :).

I made the change to the code and managed to complete install of my half-installed reputation mod... now just taking a breather and collecting myself before i close my eyes and pray that simple portal goes through OK (no reflection on simple portal here, i'm the same with any mod at all, my heart is still pounding from just completing that code change!). I'm hopeful that it will all work out!

I did not mean to suggest that i'm asking for solutions for my other mods, i mentioned it because it could give you further important info that was all, because i was thinking it's not really your mod if it's happening to other ones too. Although i really appreciate the solution above which it looks like has resolved all my problems.

Well i'm rambling on here, i'll let you know when i've added simple portal ... hopefully later today. Might go have a big glass of wine before proceeding :-).

I see you upgraded the SimplePortal site here.... all looking good :)
Title: Re: Database Error After Upgrade to RC5
Post by: hannah.love7 on April 20, 2011, 03:27:56 PM
Ok... i did it!!! Installed Simple Portal - no problems now!!! yayyyyy i'm so proud of myself, and the great support here, thanks so much for your help.
p.s. i know it doesn't show right now, i'll be adding blocks over the next few days... i'm just thrilled for now that i added it and it works great
Title: Re: Database Error After Upgrade to RC5
Post by: Stern on April 22, 2011, 08:27:18 AM
I see. You can revert that change back.

I could gave you the changes to fix this for SP, but since you seem to be having the same issue with other mods, this should fix it for all:

Sources/DbPackages-mysql.php

Code: (Find) [Select]
// Allow for unsigned integers (mysql only)
Code: (Replace) [Select]
if ($column_info['default'] === '' && in_array($type, array('int', 'tinyint', 'smallint', 'mediumint', 'bigint')))
$column_info['default'] = 0;

// Allow for unsigned integers (mysql only)
Thank you, SiNaN, all upgrades excellent!
Before that, I found another solution (http://simpleportal.net/index.php?topic=6932.msg46419#msg46419), but your advice - the best and globally!
Title: Re: Database Error After Upgrade to RC5
Post by: S.T.A.R.S on June 24, 2011, 02:39:44 PM
:/ Dont think it is.

I had inputted that code within the php file. I had installed it now.

(http://img708.imageshack.us/img708/8003/111zzz23.png) (http://imageshack.us/photo/my-images/708/111zzz23.png/)

But. I cannot see any simple portal features or anything, its like it never even installed. :/ I get this with everymod since i ever installed the first SMF on my server.

thanks
SimplePortal 2.3.8 © 2008-2024, SimplePortal