News:

Wondering if this will always be free?  See why free is better.

Main Menu

Find and Repair Errors.(forum Maintanance)

Started by Adish - (F.L.A.M.E.R), October 04, 2008, 11:06:43 AM

Previous topic - Next topic

Adish - (F.L.A.M.E.R)

While Doing forum maintanance, (find and repair Errors) as i do it, and press yes to fix it, i get the following message.

Duplicate entry '11783-16' for key 3
File: /home/goldysun/public_html/skywise/Sources/RepairBoards.php
Line: 190


Aint a problem in repairboards.php as it is a fresh one. Forum version 1.1.6

Any ideas what can be done ?

greyknight17

You might have to search in your database for that duplicate entry and remove it. Should be in the smf_messages table.

Adish - (F.L.A.M.E.R)


greyknight17

Or just 11783...should be one of the message IDs.

Adish - (F.L.A.M.E.R)

1 match(es) inside table smf_messages

It says Browse and delete. As its 1 match, shall i delete it or keep it ?

Besides if i click browse, this is what i see:-
SELECT *
FROM `goldysun_skywise`.`smf_messages`
WHERE (
`ID_MSG` LIKE '%11783%'
OR `ID_TOPIC` LIKE '%11783%'
OR `ID_BOARD` LIKE '%11783%'
OR `posterTime` LIKE '%11783%'
OR `ID_MEMBER` LIKE '%11783%'
OR `ID_MSG_MODIFIED` LIKE '%11783%'
OR `subject` LIKE CONVERT( _utf8 '%11783%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `posterName` LIKE CONVERT( _utf8 '%11783%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `posterEmail` LIKE CONVERT( _utf8 '%11783%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `posterIP` LIKE CONVERT( _utf8 '%11783%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `smileysEnabled` LIKE '%11783%'
OR `modifiedTime` LIKE '%11783%'
OR `modifiedName` LIKE CONVERT( _utf8 '%11783%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `body` LIKE CONVERT( _utf8 '%11783%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `icon` LIKE CONVERT( _utf8 '%11783%'
USING latin1 )
COLLATE latin1_swedish_ci
)
LIMIT 0 , 30


If this is confidential, then do tell me or modify the post if you want.

Adish - (F.L.A.M.E.R)


Adish - (F.L.A.M.E.R)


Adish - (F.L.A.M.E.R)

#7
I need this solved soon comon..! bump.. it shows a long page of errors !!!!

Here is the list of all the errors it found. I need to fix them or else more errors might show up.

Message #11783 is in non-existent topic #0.
Message #11785 is in non-existent topic #0.
Message #11786 is in non-existent topic #0.
Message #11787 is in non-existent topic #0.
Message #11788 is in non-existent topic #0.
Message #11789 is in non-existent topic #0.
Message #11790 is in non-existent topic #0.
Message #11791 is in non-existent topic #0.
Message #11792 is in non-existent topic #0.
Message #11796 is in non-existent topic #0.
Message #11797 is in non-existent topic #0.
Message #11798 is in non-existent topic #0.
Message #11799 is in non-existent topic #0.
Message #11800 is in non-existent topic #0.
Message #11801 is in non-existent topic #0.
Message #11802 is in non-existent topic #0.
Message #11804 is in non-existent topic #0.
Message #11805 is in non-existent topic #0.
Message #11783 is in non-existent topic #0.
Message #11785 is in non-existent topic #0.
Message #11786 is in non-existent topic #0.
Message #11787 is in non-existent topic #0.
Message #11788 is in non-existent topic #0.
Message #11789 is in non-existent topic #0.
Message #11790 is in non-existent topic #0.
Message #11791 is in non-existent topic #0.
Message #11792 is in non-existent topic #0.
Message #11796 is in non-existent topic #0.
Message #11797 is in non-existent topic #0.
Message #11798 is in non-existent topic #0.
Message #11799 is in non-existent topic #0.
Message #11800 is in non-existent topic #0.
Message #11801 is in non-existent topic #0.
Message #11802 is in non-existent topic #0.
Message #11804 is in non-existent topic #0.
Message #11805 is in non-existent topic #0.
Topic #3607 has the first message ID 11783, which is incorrect.
Topic #3612 is marked as read for one or more people, but does not exist.
Member #5 has received one or more personal messages, but does not exist.
The subject of topic #3607 is currently not stored in the subject cache.


HELP !!!

Adish - (F.L.A.M.E.R)

Why does it always happen these days that when ever i dont bump the topic to about 2 pages, no1 enters into my problems  ???

Adish - (F.L.A.M.E.R)


Kermit

After (find and repair Errors) is probably a new board  created with name

Salvage Area

Salvaged Topics or sth. like that

if yes,you should go to phpmyadmin and run that Sql-Query


SELECT m.ID_TOPIC
FROM smf_messages as m
LEFT JOIN smf_topics as t
ON (m.ID_TOPIC = t.ID_TOPIC)
WHERE m.ID_BOARD = 'xx';



if you have more then 1 Salvage Area you should change the last line of Sql-Query like this


WHERE m.ID_BOARD = 'xx' OR m.ID_BOARD = 'xy';


xx & xy  should be replaced with board id


After that Query you will probably see,the list of messages,which belongs to non of forumtopics and then you should delete them.Now the 2nd Sql-Query



DELETE FROM smf_topics WHERE ID_BOARD = 'xx';

again xx replace with the Salvage Area BoardID



After 2nd Sql-Query you should go to Admin CP -> Forum Maintenance -> Recount all forum totals and statistics.

After Recounting you can delete the Board "Salvage Area" .Finally your Errormessages cause of Find and Repair Errors should be gone ( hopefully)





If you have no Salvage Area or sth. like that,you should run another Sql-Query


SELECT m.ID_TOPIC
FROM smf_messages AS m, smf_topics AS t
WHERE m.ID_TOPIC != t.ID_TOPIC


delete all results and make again Find and Repair Errors. 
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Adish - (F.L.A.M.E.R)

It did give me a list of all the tables with 27 written but as i drop them, it gives me this message

#1054 - Unknown column 'm.ID_TOPIC' in 'where clause'

Adish - (F.L.A.M.E.R)


Adish - (F.L.A.M.E.R)


Adish - (F.L.A.M.E.R)


greyknight17

You posted the query back. Does it tell you what entry in your database table that value belongs to?

Backup your database. Go into phpMyAdmin and click on your database. Then click on the SQL tab and copy paste the following code and run it:

UPDATE smf_messages SET ID_TOPIC = (SELECT ID_TOPIC FROM smf_topics WHERE ID_LAST_MSG = 11783) WHERE ID_MSG = 11783;

See if that helps. You might also want to check your smf_messages table and make sure that the auto_increment value is correct and that it's enabled.

Adish - (F.L.A.M.E.R)

I have done the query and it gave me an output that these things are affected. Its just i cant check until my other problem of file permissions get solved as i cant check it over the site where i have to make it work.

Adish - (F.L.A.M.E.R)

#17
ok, got my forum viewing problem solved, i am not sure what i am suppose to do, am i like put that query in, and then check if find and repair errors work ?

SOrry i aint good at database stuff. :)

Edit:-
that query gave me this as the output:-
Affected rows: 0 (Query took 0.0003 sec)

UPDATE smf_messages SET ID_TOPIC = ( SELECT ID_TOPIC
FROM smf_topics
WHERE ID_LAST_MSG =11783 )
WHERE ID_MSG =11783;

Adish - (F.L.A.M.E.R)

I tried to run find and repair several times after putting that query nearly 5-6 times.

Yet doesnt work out.

Anyone help...?

Adish - (F.L.A.M.E.R)

I neeeeeeed help now..! too much patience comonn..How long for a solution here..!

Advertisement: