Author |
Message |
sowsteady
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK
|
Posted:
Thu Dec 20, 2007 12:07 pm |
|
Hi, maybe I should say news and not articles. I just discovered that I cannot add any more topics because there is already 19 of them. Any way to change and increase the limit?
This is phpnuke 7.3
Thanks. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Dec 20, 2007 1:25 pm |
|
Are you referring to adding topics through the ACP Topics? |
|
|
|
 |
sowsteady

|
Posted:
Thu Dec 20, 2007 5:05 pm |
|
No Raven, not the Forum ACP but the Topics in the phpnuke Admin menu ... these are the Topics for when posting news article on nuke.
Thanks |
|
|
|
 |
Raven

|
Posted:
Thu Dec 20, 2007 5:12 pm |
|
Uh, I never mentioned Forums . I was referring to the nuke Admin Control Panel  |
|
|
|
 |
Raven

|
Posted:
Thu Dec 20, 2007 5:13 pm |
|
Now, please explain the steps you go through and at what point you receive the error. And, what exactly is the error message you receive? |
|
|
|
 |
sowsteady

|
Posted:
Fri Dec 21, 2007 6:38 am |
|
Sorry, Raven, I somehow always "link" ACP to the Forums admin.
So when I when I want to add a topic, I go to the admin page, click on Topics. I then see a Topics Manager page where the top half shows all the 19 active topics with their icons and the bottom half is the "Add a New Topic" section.
Here I see these:-
Topic Name:
(just a name without spaces - max: 20 characters)
(for example: gamesandhobbies)
Topic Text:
(the full topic text or description - max: 40 characters)
(for example: Games and Hobbies)
Topic Image: (with drop down menu)
I enter the various stuff above and then click on Add Topic button and it just reloads the page with no additional topic added. No error messages, just reloads the page. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Dec 21, 2007 6:51 am |
|
I suspect it has to do with the data you are entering. Try to change your data and do not use the work "union" anywhere and don't use any special characters. Let us see if there really is a hard limit. I wasn't aware of one, so I suspect it is something in the data... |
_________________ 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! |
|
|
 |
sowsteady

|
Posted:
Fri Dec 21, 2007 8:35 am |
|
OK, I tried using "raven" for the Topic name and Text and still nothing happens except the page reloading. Wierd! |
|
|
|
 |
Raven

|
Posted:
Fri Dec 21, 2007 9:00 am |
|
That sounds like a MySQL INSERT error or as Montego has alluded to, some kind of a string rejection issue. have you checked your server eror log to see if there is an error being loged? |
|
|
|
 |
sowsteady

|
Posted:
Fri Dec 21, 2007 1:27 pm |
|
Oops, now it gets too technical for me. I'll try and work out how to check error logs and get back here.  |
|
|
|
 |
sowsteady

|
Posted:
Fri Dec 21, 2007 1:36 pm |
|
Ah, found it in the control panel of my host.
I did a few tries to generate a new topic and then checked the logs but nothing there apart from a complaint about a missing gif file and this :-
PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/xxxxx/public_html/modules/Multiheadlines/functions.php on line 289
What does the above mean? |
|
|
|
 |
sowsteady

|
Posted:
Fri Dec 21, 2007 1:46 pm |
|
When I look at my database with phpMyAdmin, I see this for mynukedb_Topic:-
Keyname.....Type........Cardinality...Action..Field
PRIMARY......PRIMARY..19..............Edit......Drop
topicid..........INDEX......19..............Edit......Drop
Does "Cardinality" = 19 mean anything with the problem of having Topic being limited to 19? |
|
|
|
 |
Raven

|
Posted:
Fri Dec 21, 2007 2:29 pm |
|
Does "Cardinality" = 19 mean anything with the problem of having Topic being limited to 19?
No. Cardinality shows the number of unique/distinct values for the column/index.
PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/xxxxx/public_html/modules/Multiheadlines/functions.php on line 289
That is a problem and possibly related but you won't know until you clear it up. User 'nobody' is Apache. That is telling you that Apache attempted to access your database w/o using a password and was denied, which is a good thing
Something is wrong in your setup as you are not providing a password to whatever line 289 is attempting to do. |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Fri Dec 21, 2007 4:20 pm |
|
In;
modules/Multiheadlines/functions.php on line 289
replace the whole line with this one to fix that specific problem with that module.
Code:
$title=mysql_escape_string(stripslashes(check_html($title, "nohtml")));
|
This module and the error mesage should not affect the normal nuke news/topics functions as the Multiheadlines is an RSS feed reader.
Part of the Multiheadlines setup requires a database connection so it can store incoming feeds so I guess some steps for the install might have been missed?? |
|
|
|
 |
sowsteady

|
Posted:
Fri Dec 21, 2007 4:39 pm |
|
Raven thanks for the feedback on the error. I checked the setup in Multiheadlines, all seem OK and working. I'm not sure what other setup needs to happen but I've also posted the issue on the author's site.
Guardian, what can I say except that perhaps you (and your team's) PHP, mysql, nuke knowledge is awesome! I checked the logs after doing the above change and there are no more errors.
I'll keep checking on this one.
I also tried the Topic thing again but no joy there. Still the same outcome ... |
|
|
|
 |
Raven

|
Posted:
Fri Dec 21, 2007 4:46 pm |
|
sowsteady, Send me the following info in a PM and I will take a look when I get a chance. Please reference this thread for my edification
Site URL
FTP URL, id, pass
MySQL URL, id, pass
Nuke Admin id, pass
NukeSentinel id, pass for the Nuke Admin (if applicable)
Only registered users can see links on this board! Get registered or login! |
|
|
|
 |
Guardian2003

|
Posted:
Fri Dec 21, 2007 4:54 pm |
|
now thats a good idea for a new forum sig hehe |
|
|
|
 |
sowsteady

|
Posted:
Fri Dec 21, 2007 6:19 pm |
|
Raven wrote: | sowsteady, Send me the following info in a PM and I will take a look when I get a chance. Please reference this thread for my edification
Site URL
FTP URL, id, pass
MySQL URL, id, pass
Nuke Admin id, pass
NukeSentinel id, pass for the Nuke Admin (if applicable)
Only registered users can see links on this board! Get registered or login! |
PM sent, thanks! |
|
|
|
 |
Raven

|
Posted:
Fri Dec 21, 2007 6:53 pm |
|
Got it. I'll look into it this evening if at all possible. |
|
|
|
 |
Raven

|
Posted:
Sat Dec 22, 2007 3:54 am |
|
The MySQL URL I needed was from your cPanel phpMyAdmin link. Since you didn't have that I had to manually improvise a few scripts
Raven wrote: | That sounds like a MySQL INSERT error |
That's exactly what it is. It looks like you have expanded your topics table and added 2 columns.
The initial MySQL error that was displayed was
MySQL said Column count doesn't match value count at row 1
Then I ran a query to find the column names that the table schema is expecting
topicid topicname topicimage topictext counter displayorder displayhome
Notice that there 7 expected column names
In admin/modules/topic.php and function topicmake() you are attempting to only insert 5 colums which is why the MySQL Error (Column count doesn't match value count at row 1)
"INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0')"; which (as an example) resolves to INSERT INTO nuke_topics VALUES (NULL,'Web','OffTopic.jpg','Web Related','0')
So you are missing two values. You can correct this one of two ways. A quick and dirty way is to alter your INSERT statement in admin/modules/topics.php around line 225
FROM
$sql = "INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0')";
TO
$sql = "INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0','','')";
Another way would be to alter your INSERT statment
b]FROM[/b]
$sql = "INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0')";
TO
$sql = "INSERT INTO ".$prefix . "_topics (topicid, topicname, topicimage, topictext, counter) VALUES (NULL,'$topicname','$topicimage','$topictext','0')";
The best way is to find out why those extra 2 columns are at the end of the table and either delete/drop them or fix the logic that tries to modify the tebles to add the last two columns.
Only registered users can see links on this board! Get registered or login! |
|
|
|
 |
montego

|
Posted:
Sat Dec 22, 2007 8:37 am |
|
Oh my... that is what I get for assuming a core unadulterated RavenNuke setup. Good find Mr. R.!
 |
|
|
|
 |
sowsteady

|
Posted:
Sat Dec 22, 2007 8:56 am |
|
Errm, are you still working on the script? I can't get to it from the Admin Panel.
........
Sorry Raven, should have pasted the error message, here is what I got when I click on "Topics" in the Admin Panel, blank page with the message below:-
Parse error: syntax error, unexpected T_VARIABLE in /home/xxxxx/public_html/admin/modules/topics.php on line 226 |
|
|
|
 |
Raven

|
Posted:
Sat Dec 22, 2007 10:24 am |
|
|
|
 |
sowsteady

|
Posted:
Sat Dec 22, 2007 11:35 am |
|
Raven wrote: | Should be ok now. |
Many thanks Raven, I'm still looking as to what to do after reading your diagnostics. I'll post here again if all OK and of course ... will click on the "Donate" button if it does!  |
|
|
|
 |
sowsteady

|
Posted:
Sat Dec 22, 2007 11:51 am |
|
Hmmm ... I tried both of the methods you described above but with the same result.
I guess its time to dig and find out the part where you said "The best way is to find out why those extra 2 columns are at the end of the table and either delete/drop them or fix the logic that tries to modify the tebles to add the last two columns." |
|
|
|
 |
|