Author |
Message |
k9-noja
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/5591143b4b2234e676a80.png)
Joined: Dec 07, 2009
Posts: 72
Location: holland
|
Posted:
Sun May 16, 2010 1:43 am |
|
wel again i have an issu
i just removed a member on our site/forum.
now all topics where he put a awnser in it are gone
it shows on the active topics on the site, but when i clik on it it say's
"No posts exist for this topic" |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Sun May 16, 2010 8:45 am |
|
How did you delete the user? Did you use Your_Account or the Forums?
Someone else here is also having this same problem. I'll attempt to right a script to fix this, but I don't know how it is gong to work on big DBs. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
k9-noja
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 16, 2010 9:26 am |
|
at first i tryd to delet hem on the forum. but that woudend work.
so i deleted him tru the admin controlpanel "users"
first deactived, then remove. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 16, 2010 9:40 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
k9-noja
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 16, 2010 9:56 am |
|
oke i got the script, but how do i call it ? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
k9-noja
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 16, 2010 10:04 am |
|
palbin, i have send you a PM ![Embarassed](modules/Forums/images/smiles/icon_redface.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 16, 2010 10:37 am |
|
k9-noja, don't worry about backing up your database for now. The script I am posting here will not affect it.
Open up notepad or some other text editor. Put the following code in it and then call it something like post_check.php. Then upload the file via FTP to the root of your site. Then call the script like so http://www.yoursite.com/post_check.php
When you go there it will show something like There are X posts with a -1 poster_id.. I want to know how many posts it says have a -1 value. It could possible be 0.
Code:
<?PHP
require 'mainfile.php';
global $db, $prefix;
$sql = 'SELECT `poster_id` FROM `' . $prefix . '_bbposts` WHERE `poster_id` = -1';
$result = $db->sql_query($sql);
if ($result) {
$problem_posts = $db->sql_numrows($result);
} else {
$problem_posts = 0;
}
echo 'DONE!<br /><br />'
, 'There are ' , $problem_posts , ' posts with a -1 poster_id.';
?>
|
If you need more help please feel free to reply here ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
k9-noja
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 16, 2010 12:59 pm |
|
DONE!
There are 14 posts with a -1 poster_id. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 16, 2010 6:14 pm |
|
First thing you have to do is backup your DB via phpmyadmin. You will not have to worry about restoring it, but better safe than sorry.
http://www.siteground.com/tutorials/php-mysql/mysql_export.htm
Once you have a backup of your DB create a file called fix_posts.php with the following code in it. Place this file in the root of your site as you did with the previous file.
Code:
<?php
require 'mainfile.php';
global $db, $prefix;
$content = '';
$sql = 'SELECT `post_id` FROM `' . $prefix . '_bbposts` WHERE `poster_id` = -1';
$result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result, MYSQL_ASSOC)) {
$db->sql_query('UPDATE `' . $prefix . '_bbposts` SET `poster_id`="1" WHERE `post_id`="' . $row['post_id'] . '" AND `poster_id`="-1"');
$content .= 'Post ' . $row['post_id'] . ' poster_id updated.<br />';
}
echo $content , '<br /><br />DONE!';
?>
|
It should list the 14 posts that have been updated. Once you have run the script check your forums to see if the topics show. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
k9-noja
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon May 17, 2010 1:17 am |
|
back-up.... check
fix_posts.php. ..... check
run ......
Post 401 poster_id updated.
Post 402 poster_id updated.
Post 405 poster_id updated.
Post 406 poster_id updated.
Post 409 poster_id updated.
Post 415 poster_id updated.
Post 416 poster_id updated.
Post 417 poster_id updated.
Post 418 poster_id updated.
Post 432 poster_id updated.
Post 444 poster_id updated.
Post 445 poster_id updated.
Post 452 poster_id updated.
Post 455 poster_id updated.
DONE!
problem..... not solved ![Confused](modules/Forums/images/smiles/icon_confused.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Thu May 20, 2010 8:37 am |
|
Deleting users through the Forums should be removed from RN... Sorry. I know this doesn't help the issue at hand, but would help folks go forward from using that feature when they should not. There may be other such features in Forums Admin that should be removed as well. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
k9-noja
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu May 20, 2010 8:51 am |
|
well i removed him tru the admin pannel of RN.
and thats where the problem started
![Laughing](modules/Forums/images/smiles/icon_lol.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu May 20, 2010 9:19 am |
|
Yes, but not before you tried to use the forums.
I am out of ideas on why the topics are not showing. Unless you are will to provide me with access to your db I'm not sure we can resolve this because I'm really just shooting in the dark. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
k9-noja
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 03, 2010 2:11 am |
|
i want to try to deleat another user, that is not actief on the forum.
i went to admin panel > forums > user admin menagment >
and taged the "delete this user....."
i get the following massage :
Could not delete group for this user
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2
DELETE FROM nuke_bbgroups WHERE group_id =
Line : 140
File : admin_users.php
but the user is deleted.
![Rolling Eyes](modules/Forums/images/smiles/icon_rolleyes.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jun 03, 2010 4:35 am |
|
In the future do not use the forums to delete users. Use the "Edit Users" section of the main administration (www.yoursite.com/admin.php) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snype
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 12, 2008
Posts: 58
|
Posted:
Thu Jun 03, 2010 6:30 am |
|
What i done to fix this problem i had a couple of years back with my old clan was ask my host for there latest back up of my site this included the databases i then uploaded the user that i deleted back in the nuke_users and that seemed to do the trick from there i just changed his name to DELETED and reset the pass and all other things that he had entered upon registration.
May not be the right way but it worked for me |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mrix
Client
![](modules/Forums/images/avatars/blank.gif)
Joined: Dec 04, 2004
Posts: 757
|
Posted:
Fri Jun 04, 2010 7:09 pm |
|
Thats where my problems lies as over the years I have deleted many members from the forum admin
Cheers
mrix |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jun 04, 2010 7:20 pm |
|
I can probably fix it, but I would need cpanel access to someone's site or at least ftp and phpmyadmin access. The problem is that I can't figure out what is actually causing the problem in the forums to try and fix it. It has to be a problem in the database. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|