Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.1
Author Message
GanjaUK
Life Cycles Becoming CPU Cycles



Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Tue Mar 02, 2004 12:12 pm Reply with quote

I just tried adding a new module today, but it does not show in "invisible modules" and not in the admin modules menu, I tried with several different uploads to the module directory and none are showing. This never use to be a problem as I have added plenty of extra modules, but now I cant do it at all.

I don't really know where to even begin to find what's wrong, any ideas would be very helpful. Maybe its a problem in one of your security fixes that's suddenly caused this change?

I get this error in admin modules when I use a custom module file.
Quote:
Column count doesn't match value count at row 1

This error will appear for each module I have uploaded.

When i use the original admin modules I dont see this error but the module still does not show up.
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Mar 02, 2004 1:07 pm Reply with quote

Have you tried this fix?

http://www.ravenphpscripts.com/posts844-highlightmodules.html+show
 
View user's profile Send private message
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Tue Mar 02, 2004 1:08 pm Reply with quote

Maybe you were using the modules tweak? it adds another field (mcid) to the modules db table, once a user replaced the module files (modules.php, main & admin) the modules fail to work because of this extra field, you don't mention your Nuke version or i missed it but 7.0 has an error in those files, the lines that insert new modules to the db is missing one field ( , '0' )
 
View user's profile Send private message Visit poster's website
GanjaUK







PostPosted: Tue Mar 02, 2004 1:21 pm Reply with quote

Hi,

Raven my line reads:
Code:
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '1', NULL)", $dbi);

I changed to:
Code:
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0', NULL)", $dbi);


This did not fix it.

Chatserv, I think you are right because when I use to install new modules once i had googletapped, the googletap url would appear as 0 in the preferred googletap field in admin modules, but then I used the modules tweak and it started appearing as the googletap url instead.

I'm using nuke 7.1, google tapped and with a tweaked module menu.
What do can I do to fix this? I don't know a lot about messing with php myadmin, if you know how to fix it and have a spare minute, could I send you my db details and you change it for me?

Thanks
 
Raven







PostPosted: Tue Mar 02, 2004 4:16 pm Reply with quote

I should have added that you only needed to try that if your structure didn't already have it - yours does.

Here's what I would do. You are trying to insert 8 values into the table. Use phpMyAdmin and select that table and count the number of columns in your actual table. That will tell you which is off.
 
GanjaUK







PostPosted: Tue Mar 02, 2004 5:03 pm Reply with quote

I have 9:
mid title custom_title active view inmenu mod_group url mcid
 
chatserv







PostPosted: Tue Mar 02, 2004 5:58 pm Reply with quote

If you will be using Nuke's default files get rid of the mcid field
 
GanjaUK







PostPosted: Tue Mar 02, 2004 6:06 pm Reply with quote

I would like to carry on using the menu I use at the moment if that is possible. I could add new modules via myadmin as a last resort, but is there no way I can get this to work how it is?
 
chatserv







PostPosted: Tue Mar 02, 2004 7:41 pm Reply with quote

If i recall correctly that mod was designed for Nuke 6.5, it will not work with 7.0 or 7.1 without modifying it because both have new fileds in the modules and blocks db tables, you could just edit the insert lines so that they match the table, the number of items in the query:
Code:
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '1', NULL)", $dbi);

Must match the number of fields in the table.
 
GanjaUK







PostPosted: Tue Mar 02, 2004 7:48 pm Reply with quote

Yeah this one is for 7.1, I tested it for telli before he released it to get it working right, there was a few errors, but I thought it was working OK in the end. I will try the above.
 
GanjaUK







PostPosted: Tue Mar 02, 2004 9:37 pm Reply with quote

Ok I seem to have fixed it up, by changing the line to this:
Code:
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0', NULL, '1')", $dbi);


If you see any error in that line, let me know, but it seems to be working this end.
Thanks for your help guys.
 
chatserv







PostPosted: Tue Mar 02, 2004 9:54 pm Reply with quote

If it works then great but i don't see why you have a NULL near the last inserts, in my tables the only auto_increment field i have is the first one, but i guess the tweak's mcid field is auto_increment too?
 
GanjaUK







PostPosted: Tue Mar 02, 2004 10:12 pm Reply with quote

Good point, but it don't matter too much because that's the googletap url field. But I have made a small edit now which I think GT should have implemented to start with:

Code:


sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0', '$modlist[$i].html', '1')", $dbi);


The mcid field just sets the default category to general for the new module.

Also there is a big gap between MID fields now, the last module entry is 50, but each new one I add is above 100 now, is that normal? Should the new entry not be 51?

edit: Actually I guess the googletap field should not be $modlist[$i].html as some new modules, you would not want googletapped straight away.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.1

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 ©