|
|
| Author |
Message |
chris Dark Lord of the Sith

Joined: 10 May 2003 Posts: 6262 Location: Outer Space
|
Posted: Thu Dec 11, 2003 11:42 am Post subject: Modules do not show and/or disappear in PHP-Nuke v. 7 alpha |
|
|
|
A tip of the hat to chris-au for this:
Problem: In PHP-Nuke version 7 alpha, when adding a module to the modules folder it won't show in admin/modules. When renaming a module, with FTP or similar, the module also disappears.
Reason:The problem is that in admin/modules/modules.php, of that version, on the line that inserts the modules in the folder modules, the number of fields is incorrect.
Solution: In admin/modules/modules.php
The lines with:
| Code: |
if ($mid == "") {
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1')", $dbi);
}
|
Should have been:
| Code: |
if ($mid == "") {
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0')", $dbi);
}
|
Notice the EXTRA ,'0' before the )",$dbi);
This error seems to affect only v. 7 alpha. _________________ Regards
Chris Karakas
www.karakas-online.de |
|
| Back to top |
|
 |
Guardian Staff Sergeant

Joined: 19 Sep 2003 Posts: 47 Location: UK Northwest
|
Posted: Thu Jan 08, 2004 1:14 pm Post subject: Also 7.0 Final |
|
|
|
This also affects some of the 7.0 Final downloads I have come across.
People should also be aware that there are some third party modules which alter the nuke_modules table.
All you have to do to determine if this might be a problem for you is to view your nuke_modules table through phpMyAdmin or similar and count the number of fields and then compare this with the code in admin/modules.php
| Code: | if ($mid == "") {
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0')", $dbi);
} |
The above gives us 7 fields. _________________ be all that you can be.. |
|
| Back to top |
|
 |
cyrobyte Private

Joined: 02 Jun 2005 Posts: 4 Location: Wanganui, New Zealand
|
Posted: Thu Jun 02, 2005 4:35 am Post subject: |
|
|
|
| I'm still having the problem after fixing the code. I've checked through phpMyAdmin and I have 6 fields. I'm using php 7.6 by the way. |
|
| Back to top |
|
 |
chris Dark Lord of the Sith

Joined: 10 May 2003 Posts: 6262 Location: Outer Space
|
Posted: Thu Jun 02, 2005 8:37 am Post subject: |
|
|
|
You mean you have PHP-Nuke 7.6? How did you arrive at this version? Is it a vanilla download or is it some kind of an upgrade? I guess you have old files in your installation. _________________ Regards
Chris Karakas
www.karakas-online.de |
|
| Back to top |
|
 |
cyrobyte Private

Joined: 02 Jun 2005 Posts: 4 Location: Wanganui, New Zealand
|
Posted: Sat Jun 04, 2005 10:14 am Post subject: |
|
|
|
| Yup, sorry for the typo. I have php-nuke 7.6 installed. But, i've solved the problem. It seems that I used the web installer to install my database and it was the older version I think. So, the database had missing fields in it and wasn't really compatible with php-nuke 7.6. Maybe it was for the previous version of php-nuke. So, what I did was delete the whole database, and rebuild it using SQL by uploading the nuke.sql file into it. So, I've got a database which is compatible with php-nuke 7.6. I'm not sure if I'm using the right term by explaining all this because it's my first time doing php-nuke. |
|
| Back to top |
|
 |
chris Dark Lord of the Sith

Joined: 10 May 2003 Posts: 6262 Location: Outer Space
|
Posted: Sat Jun 04, 2005 1:15 pm Post subject: |
|
|
|
You explained it very well, cyrobyte - thank you!  _________________ Regards
Chris Karakas
www.karakas-online.de |
|
| Back to top |
|
 |
|
|
 |
|
|