Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Susann
Moderator


Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Sat Oct 25, 2008 10:40 am Reply with quote

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.
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Sat Oct 25, 2008 2:37 pm Reply with quote

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! 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Sat Oct 25, 2008 3:51 pm Reply with quote

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.
 
View user's profile Send private message Send e-mail
Susann
PostPosted: Sun Oct 26, 2008 3:27 am Reply with quote

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
PostPosted: Sun Oct 26, 2008 3:21 pm Reply with quote

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
PostPosted: Sun Oct 26, 2008 5:30 pm Reply with quote

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: 17077

PostPosted: Sun Oct 26, 2008 6:09 pm Reply with quote

Please post a Mantis issue. Thanks!
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©