Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: pepa on February 11, 2018, 06:07:48 AM

Title: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 06:07:48 AM
When I try to create a new Board I get an error message:

"Field 'img_name' doesn't have a default value
File: /home/psychol1/reformaps.net.au/forum/Sources/Subs-Boards.php
Line: 785

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.14. The above error might possibly go away if you execute the latest version of upgrade.php."

This may be related to the Mod Board Color and Icons.  WIth that mod installed I tried to create a new category and got an error message "Field 'Icon' doesn't have a default value" followed by the path to Subs-Boards.php, Line:797 and a Note the same as in the error message listed above.

So I uninstalled Board Color and Icons and could then create a new Category, but then couldn't create a new board in any category.  I posted this in the Board Color and Icons Mod topic but now am wondering if it's related to the mod or something else.

HELP ... what do I do?
Title: Re: Error Trying to Create a New Board
Post by: Aleksi "Lex" Kilpinen on February 11, 2018, 06:11:41 AM
It would most likely be that mod, and the icon or image field not having a default value, so for it to work you need to set a value ( so not leave it blank ). This would be something for the mod author to fix for future compatibility really I think.
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 06:27:27 AM
It would most likely be that mod, and the icon or image field not having a default value, so for it to work you need to set a value ( so not leave it blank ). This would be something for the mod author to fix for future compatibility really I think.

Yes but I've uninstalled the mod.  Is there now a procedure I can use to fix my forum, it's pretty broken as it is now not being able to create any new boards.  The mod author hasn't been active for awhile, so not expecting any help there.
Title: Re: Error Trying to Create a New Board
Post by: Aleksi "Lex" Kilpinen on February 11, 2018, 06:29:45 AM
You could find that "img_name" field in your database and set a default value for it, or probably remove the field completely.
I don't know the mod, or what changes it actually makes so I can't say for certain.
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 06:41:39 AM
Well, it gets worse.  I uploaded Sus-Boards.php file from a recent backup and now there's a new error message.  So I uploaded the Subs-Boards.php previous file that had just been overwritten but still get the same error message:

"Unknown column 'b.color' in 'field list'
File: /home/psychol1/reformaps.net.au/forum/Sources/Subs-Boards.php
Line: 1064

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.14. The above error might possibly go away if you execute the latest version of upgrade.php."

Any thoughts?
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 07:03:50 AM
You could find that "img_name" field in your database and set a default value for it, or probably remove the field completely.
I don't know the mod, or what changes it actually makes so I can't say for certain.

Just checked the database using phpMyAdmin ... there is no such field.
Title: Re: Error Trying to Create a New Board
Post by: Illori on February 11, 2018, 09:24:19 AM
where in the database did you look for that column?
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 12:57:40 PM
Well, it gets worse.  I uploaded Sus-Boards.php file from a recent backup and now there's a new error message.  So I uploaded the Subs-Boards.php previous file that had just been overwritten but still get the same error message:

"Unknown column 'b.color' in 'field list'
File: /home/psychol1/reformaps.net.au/forum/Sources/Subs-Boards.php
Line: 1064

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.14. The above error might possibly go away if you execute the latest version of upgrade.php."

Any thoughts?

Illori

I found the column, deleted it, but now I have the problem stated above?
Title: Re: Error Trying to Create a New Board
Post by: Illori on February 11, 2018, 01:01:42 PM
attach your subs-boards.php file so it can be reviewed. it sounds like the code is left in the file.
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 04:02:47 PM
attach your subs-boards.php file so it can be reviewed. it sounds like the code is left in the file.

Thanks Illori .. file is attached

Title: Re: Error Trying to Create a New Board
Post by: Illori on February 11, 2018, 04:35:19 PM
did you have errors when you uninstalled the mod?
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 04:39:26 PM
did you have errors when you uninstalled the mod?

No,message was that the uninstall was successful.  But I do get error messages if I try to install it now.  It's possible I may have installed it, it was awhile ago, using emulation.
Title: Re: Error Trying to Create a New Board
Post by: Illori on February 11, 2018, 06:06:57 PM
it looks to me like the edits were not removed from this file. you might be best to start over with fresh files and install your mods after. we dont know if any edits were left behind in other files.

https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 06:18:02 PM
it looks to me like the edits were not removed from this file. you might be best to start over with fresh files and install your mods after. we dont know if any edits were left behind in other files.

https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

Thanks Illori, I'll give that a shot.  Will be a lot of work afterwards getting the forum back to how it was ... oh well, sigh.
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 11, 2018, 06:27:21 PM
One question before I begin.  When I go here https://download.simplemachines.org/  there is no large upgrade file for SMF 2.0.15, just the install from scratch.  Is that the one I need?

Update: OK dyslexic from stress.  Please ignore above question.
Title: Re: Error Trying to Create a New Board
Post by: Aleksi "Lex" Kilpinen on February 13, 2018, 04:41:41 AM
I see you found the right package. :)
Do let us know if you need any further help with this, or if that solved your issues OK.
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 13, 2018, 07:21:04 AM
I see you found the right package. :)
Do let us know if you need any further help with this, or if that solved your issues OK.

Thank you Aleksi : ).  I spent last night collating all the changes I had made, php coding, css, graphics, custom profile fields etc etc.  All documented for me now, so I'm ready to go on installing the files from the large upgrade. However won't be doing that until Thursday 15th February, my time ... Brisbane, Australia.

Will certainly report back, but feeling confident and a lot better now that I've documented all changes and also very grateful to Illori for the suggestion.  When it's all complete I'll have a few general suggestions to make!
Title: Re: Error Trying to Create a New Board
Post by: Aleksi "Lex" Kilpinen on February 13, 2018, 07:22:11 AM
Well good luck, and we'll be waiting :)
Title: Re: Error Trying to Create a New Board
Post by: pepa on February 13, 2018, 09:58:56 PM
Had a few spare minutes to play.  So followed the error messages ...

deleted from Subs-Boards.php the field b.color and then b.icon, I could then get into /Modify Boards in the Admin panel.  Tried creating a new board: error about "img_width" not having a default value, I dropped that column using PhpMyAdmin.  Tried creating a new board again: error about "field_height" so I dropped that column.

After those changes I could create the new board, will now have to take the forum our for a test drive to check other aspects.

Question:  What's the consensus wisdom here, would it still be better to do the large upgrade, or leave things as they are now if the forum seems OK?
Title: Re: Error Trying to Create a New Board
Post by: Aleksi "Lex" Kilpinen on February 14, 2018, 06:01:09 AM
If you got everything working and don't run in to any further issues, no reason to wipe out everything I think.
Just keep an eye on things, including your error logs, for a while.