Author |
Message |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Sat Oct 25, 2008 10:40 am |
|
What could be the reason for duplicate modules in admin modules administration ? I have two Legal modules and 2 Groups after updating.
I know how to fix this in the database thats not the question but I just would like to know whats the reason for this behavior general because its not the first time I have to delete duplicate modules after upgrade. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Oct 25, 2008 2:37 pm |
|
Unfortunately, the nuke_modules table does not have a unique key on the module name, hence why this is possible. I can see where Legal might have been inserted again if you had had the module previously, then removed the tables, but not the Legal directory. It would not have gotten removed from the nuke_modules table and the check that I am doing for the "does Legal already exist" would not have caught this discrepancy.
Not sure on the groups as this code should have prevented that:
Code:
// Make sure the Groups module is in the _modules table
if ($db->sql_numrows($db->sql_query('SELECT mid FROM '.$prefix.'_modules WHERE title = \'Groups\'')) == 0) {
$sql = 'INSERT INTO `'.$prefix.'_modules` VALUES(NULL, \'Groups\', \'Groups\', 1, 0, \'\', 1, 0, \'\')';
sqlexec($sql);
}
|
|
_________________ 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! |
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sat Oct 25, 2008 3:51 pm |
|
This is an interesting one. I had this myself once but I think it was a nuke upgrade rather than an RN upgrade. I never did find the cause but if I remember correctly, the module that was duplicate had a custom module name - that might not be relevant but wanted to mention it. |
|
|
|
 |
Susann

|
Posted:
Sun Oct 26, 2008 3:27 am |
|
Thats the first time I installed the Legal module.Its a RN upgrade.In the administration I have these 2 modules and one is set to a group the other is set to no group. I didn´t do this. So I suppose it has something to do with the exiting groups. But I guess I will never find out the real reason why this happens sometimes. I had this before with the newsletter also. |
|
|
|
 |
montego

|
Posted:
Sun Oct 26, 2008 3:21 pm |
|
Sure does sound like a bug. We can either post a Mantis issue about it or just one of us needs to remember the next time we're in the rndb_upgrade.php script to review this thoroughly again and make sure we're not causing it. |
|
|
|
 |
Susann

|
Posted:
Sun Oct 26, 2008 5:30 pm |
|
Just review this the next time you rndb_upgrade.php.
I noticed this on two sites with forums groups but without NSN Group.
So I believe you need as a minimum exact the same constellation to find later within the modules administration duplicate modules.
Maybe there are other factors too but I can´t remember what I exactly did.
The most will not have this issue and its easy to fix in the database. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sun Oct 26, 2008 6:09 pm |
|
Please post a Mantis issue. Thanks! |
|
|
|
 |
|