News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

(SOLVED) Karma is screwed up Karma description Mod problem

Started by hvyhitter, March 10, 2009, 09:12:44 PM

Previous topic - Next topic

hvyhitter

Database Error
Field 'comment' doesn't have a default value
File: C:\Inetpub\Smf\Sources\Karma.php
Line: 112

That is the error I get.. line 112 of that file is

);

Thats it.. but says database error..

I had the advanced Karma mod installed I uninstalled it.. and.. well this happened then..

When I installed the Advanced karma mod.. I saw one error in Karma.php.

so smart guy that i am mods it by hand.. it worked until I uninstalled it.

now.. well.. It is broke.

just reinstalled a fresh SMF directory.. that made no difference.. so I am guessng NOW I gotta go in the Karma table and do SOMETHING in the database?

anyone? I searched for this error came up with nothing.

NOTE TO SELF

NEVER EVER EVER EVER MANUALLY MOD YOUR FORUM IF IT DOESNT GO ON CLEAN. TRASH IT

Running RC1 on a IIS box with windows 2003 latest PHP and MySQL.

Fustrate

I'm assuming you mean the Advanced Reputation System?

You'll need to remove these rows from the database:
comment
action_type
topic
title
message

and change the primary key back to id_target and id_executor.
Steven Hoffman
Former Team Member, 2009-2012

hvyhitter

ahh yes.. another reason why I SHOULD have done backups.
i am in MYsqladmin.. good to know that stuff. NOW to find it.

hvyhitter

#3
Quote from: Fustrate on March 10, 2009, 09:20:32 PM
I'm assuming you mean the Advanced Reputation System?

You'll need to remove these rows from the database:
comment
action_type
topic
title
message

and change the primary key back to id_target and id_executor.

ok accomplished ALL but that last part.. I found
comment
action_type
topic
title
message

and deleted those.

now i am confused as to what

"and change the primary key back to id_target and id_executor."

means.. I see those two on the TOP of that column and indicies tab..

the primary key back to id_target and id_executor...hmmmmm i do not follow.

added a screenie.. i will keep hunting around for it.


Fustrate

#4
Never used mysqladmin, but can you find the word "primary" anywhere on the page? It should say that 'id_executor', 'topic', 'message' are the primary keys, but you need to delete the last two and add 'id_target'

Maybe under "Table Options" or "Advanced Options"?
Steven Hoffman
Former Team Member, 2009-2012

hvyhitter

Never mind.. found the tab.. attached is the screenie toggle the box.. and hit apply.. you will see those turn to yellow lightning bolts..

commit changes (really should do a backup first LOL)

and boom done.


hvyhitter

didnt work.. the error looks like something related to the description field.. it is complaining that THAT doesnt have a default value. I tried putting a zero and test both complained.

hmmm.. is the DESCRIPTION one i should delete too?

hvyhitter

#7
alright.. I am going to do a parallel install of smf and see what it makes.. my forum is brand new so whatever is default should be cool


ok UPDATE.. this is what it is SUPPOSED to look like in a CLEAN smf_log_karma table

see attached.. this SHOULD work if i make it look the same.. logically thinking that is. :D

hvyhitter

Confirmed WORKING

also not another difference was the line ACTION it says INTEGER(8)

i changed it back to what my screenie said which was TINYINT(4)

no idea what that means but that works.

so anyone that is fool enough to add the advanced Karma mod despite a script warning that it doesnt like the Karma.php file (which WAS very cool but my users didnt like it)

well there you are.. how you get back to normal.

This WASNT in a search of the community.. special thanks to Fustrate for the help but the 100% complete answer is here.

I am SURE I will be back for the next issue..

Thanks again SMF you rock..


hvyhitter

That should be descriptive enough for someone to find in a search.. lol


if anyone has this problem in the future and cant figure it out let me know contact me via my forum.. send me a pm and I will walk you through mysqladmin..

its a little bit of a hunt.. but I am NOT a database guy and I got lucky.

Fustrate

Good to hear :) in light of this, I've added an uninstall script to the package so this won't happen with future versions.
Steven Hoffman
Former Team Member, 2009-2012

hvyhitter

yeah my users are weird.. they didnt like it.. they like to misbehave and giving people negative karma is a sport.

oh.. didnt know this is your mod.. It is a great mod and very cool the way it looks.

as you can see.. *i* was a big fan.. but we voted

http://www.hvyhitter.com/index.php?topic=39.0


Fustrate

I'd probably never use it myself, but it's got its uses. Sounds like your members just like some good ol' "nuttkicking" ;)
Steven Hoffman
Former Team Member, 2009-2012

hvyhitter

After some testing.. i thought it was your MOD that did it.. and I am WRONG.. it was the Karma description mod.. the database is all hosed up.. it didnt work out of the box the first time. and when you remove it.. it doesnt repair the Karma part of the database.. so YOUR mod.. 100% NOT the problem.

ill change the topic.. because it is WRONG

Fustrate

:P I was about to suggest using that if your members still want comments
Steven Hoffman
Former Team Member, 2009-2012

Advertisement: