Author |
Message |
spyrule
Worker


Joined: Jun 06, 2006
Posts: 105
|
Posted:
Tue Aug 28, 2007 10:56 am |
|
Hello,
I'm not sure if this falls under Themes or not, but ...
All the menu option when I'm logged in as Administrator, are broken :
· Administration, = http://kccweb.sunmedia.org/"admin.php/"
· NEW Story = http://kccweb.sunmedia.org/"admin.php?op=adminStory\"
· Change Survey = http://kccweb.sunmedia.org/"admin.php?op=create\"
· Content = http://kccweb.sunmedia.org/"admin.php?op=content\"
· Logout = http://kccweb.sunmedia.org/"admin.php?op=logout\"
This only seems to be happening on the Administrator menu, and nothing else.
The problem is the /"admin.php?op=XXX\" it's the first quote, and the trailing \" that is the issue.
The odd part, is that besides adding a module and 2 tables, I have not modified the files in anyway, so I don't know how this got changed.
Anybody out there have a suggestion on where to look for this change? |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Tue Aug 28, 2007 11:09 am |
|
Go into your admin panel, blocks, and edit the Administration block. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
spyrule

|
Posted:
Tue Aug 28, 2007 11:43 am |
|
I've edited them, and the quotes are still getting added back into the link.
How is this happening?!? |
|
|
|
 |
Gremmie

|
Posted:
Tue Aug 28, 2007 5:42 pm |
|
I dunno, works for me. Are you using the WYSIWYG editor? Do you have short links or rewrite rules on? |
|
|
|
 |
spyrule

|
Posted:
Tue Aug 28, 2007 7:23 pm |
|
Yeah, that's the odd part. I have a duplicated website with the exact same Db, and I re-installed the raven files (except my config.php file), and the problem doesn't exist there.
So obviously the file that creates/modifies the changes is the problem.
Where do I control Short links/rewrites from? |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Aug 28, 2007 7:39 pm |
|
ShortLinks will not touch anything with admin.php in it, only modules.php, so that is not it.
Make sure the following function in mainfile.php is correct:
function adminblock()
Also, try commenting out this line:
Code:
$content = preg_replace('/\badmin.php/', $admin_file.'.php', $content); //RN6444
|
If that does nothing, put it back. Not sure what is wrong. |
_________________ 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! |
|
|
 |
Gremmie

|
Posted:
Tue Aug 28, 2007 9:00 pm |
|
Hey that's my fix!  |
|
|
|
 |
spyrule

|
Posted:
Tue Aug 28, 2007 9:31 pm |
|
Thanks guys, I'll test this in the morning when I can get to the server (it's an intranet server, so no external access from home!).
-spyrule |
|
|
|
 |
montego

|
Posted:
Wed Aug 29, 2007 6:30 am |
|
spyrule, also try editing the links directly through phpMyAdmin. If you see them correctly within the database, then its code related. At least we would be closer to figuring this out. |
|
|
|
 |
spyrule

|
Posted:
Wed Aug 29, 2007 9:46 am |
|
Yeah,
That above code doesn't seem to have made any difference.
Where in the database are those strings stored? |
|
|
|
 |
montego

|
Posted:
Wed Aug 29, 2007 8:12 pm |
|
It is in table nuke_blocks and look for a bkey of admin |
|
|
|
 |
spyrule

|
Posted:
Thu Aug 30, 2007 7:48 am |
|
Thanks montego,
I looked in the Db, and they are fine. So I'm not sure where this link error is occuring.
Which actual file generates the display on the page?
I might just replace it with an original to see what happens.
spyrule |
|
|
|
 |
montego

|
Posted:
Thu Aug 30, 2007 8:03 am |
|
mainfile.php in that function that I mentioned above. |
|
|
|
 |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Thu Aug 30, 2007 8:30 am |
|
Quote: | <strong><big>·</big></strong> <a href="admin.php">Administration</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=adminStory">NEW Story</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=create">Change Survey</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=content">Content</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=purchase">Purchase</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=logout">Logout</a> |
I just went into Phpmyadmin on my local test system, brought up the nuke_blocks table, went in to edit the bkey = admin record and copied and pasted the contents above. Don't copy exactly what I posted since I have some modules there you won't but that's the format you should see.
It is very unlikely that mainfile is doing anything to foul this up for you unless you've hacked it. |
|
|
|
 |
spyrule

|
Posted:
Tue Sep 04, 2007 7:23 am |
|
Ok, I am totally stumped.
I have replaced the mainfile.php (it's possible that I edited something at some point).
Replaced the content of the Db completely, as mentioned by fkelly (skipping the Purchase line only).
and I still get the same broken links. I'm quite stumped.
I don't want to replace all the files, since I have had to modify some files, however I have not kept a history of files modified, so I cannot remember what I all did (my stupidity in this instance is obvious).
The main things that I have done, is edited the english/french language files to add a few _translation words to /modules/Your_Account/index.php file. specifically changing the :
Quote: | .'<center><font class="content">[ <a href="modules.php?name='.$module_name.'&op=pass_lost">'._PASSWORDLOST.'</a> | <a href="modules.php?name='.$module_name.'&op=new_user">'._REGNEWUSER.'</a> ]</font></center>'."\n"; |
and commented it out, and replaced with :
Quote: |
.'<center><font class="content">'._ACTIVATESEEMANAGER.'</font></center>'."\n";
|
This is the only major change that I have done.
Any idea's from anybody, would be greatly apreciated.
Spyrule. |
|
|
|
 |
fkelly

|
Posted:
Tue Sep 04, 2007 9:18 am |
|
Could you go into administration, then blocks. You should have a block called administration. Go to edit it. In the content area of the wysiwyg editor there will be a bunch of text. Copy and paste it into a code block here in the forums and post it.
This thing is pretty straightforward which makes your situation very puzzling. There is a function called adminblock in mainfile that just reads in the blocks table for records with bkey=admin and stuffs the content into a $content variable for presentation in the block. If the links are good there they should be good on the page. |
|
|
|
 |
montego

|
Posted:
Wed Sep 05, 2007 5:01 am |
|
Yeah, I am stumped as well. Maybe also try posting the function code in mainfile.php for adminblock(). Pleae do NOT post the whole mainfile.php code! Just this function. |
|
|
|
 |
spyrule

|
Posted:
Wed Sep 05, 2007 3:03 pm |
|
Thanks guys,
ok here is the text in source mode first, and then normal view after :
Code:<strong><big>·</big></strong> <a href="\"admin.php\"">Administration</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=adminStory\"">NEW Story</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=create\"">Change Survey</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=content\"">Content</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=logout\"">Logout</a>
|
Code:
· Administration
· NEW Story
· Change Survey
· Content
· Logout
|
Here's the odd part, if I edit this, and remove the offending quotes and slashes, as soon as I save them they reappear.
Here is the code for the adminblock() function :
Quote: | function adminblock() {
global $admin, $prefix, $db, $admin_file;
if (is_admin($admin)) {
$sql = 'SELECT title, content FROM '.$prefix.'_blocks WHERE bkey=\'admin\'';
$result = $db->sql_query($sql);
while (list($title, $content) = $db->sql_fetchrow($result)) {
//$content = preg_replace('/\badmin.php/', $admin_file.'.php', $content); //RN6444
$content = '<span class="content">'.$content.'</span>';
themesidebox($title, $content);
}
$title = _WAITINGCONT;
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_queue'));
$content = '<span class="content">';
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=submissions">'._SUBMISSIONS.'</a>: '.$num.'<br />';
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_reviews_add'));
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=reviews">'._WREVIEWS.'</a>: '.$num.'<br />';
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_newlink'));
$brokenl = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_modrequest WHERE brokenlink=1'));
$modreql = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_links_modrequest WHERE brokenlink=0'));
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=Links">'._WLINKS.'</a>: '.$num.'<br />';
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=LinksListModRequests">'._MODREQLINKS.'</a>: '.$modreql.'<br />';
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=LinksListBrokenLinks">'._BROKENLINKS.'</a>: '.$brokenl.'<br />';
$num = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_newdownload'));
$brokend = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_modrequest WHERE brokendownload=1'));
$modreqd = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_downloads_modrequest WHERE brokendownload=0'));
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=downloads">'._UDOWNLOADS.'</a>: '.$num.'<br />';
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=DownloadsListModRequests">'._MODREQDOWN.'</a>: '.$modreqd.'<br />';
$content .= '<strong><big>·</big></strong> <a href="'.$admin_file.'.php?op=DownloadsListBrokenDownloads">'._BROKENDOWN.'</a>: '.$brokend.'<br /></span>';
themesidebox($title, $content);
}
} |
Any help here is apreciated,
Spyrule |
Last edited by spyrule on Wed Sep 05, 2007 3:09 pm; edited 1 time in total |
|
|
 |
spyrule

|
Posted:
Wed Sep 05, 2007 3:08 pm |
|
And as a reference ,
This is my edit just before saving the text :
Quote: | <strong><big>·</big></strong> <a href="\admin.php">Administration</a><br />
<strong><big>·</big></strong> <a href="\admin.php?op=adminStory">NEW Story</a><br />
<strong><big>·</big></strong> <a href="\admin.php?op=create">Change Survey</a><br />
<strong><big>·</big></strong> <a href="\admin.php?op=content">Content</a><br />
<strong><big>·</big></strong> <a href="\admin.php?op=logout">Logout</a> |
And this is what I get when I look at the source after saving :
Quote: | <strong><big>·</big></strong> <a href="\"admin.php\"">Administration</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=adminStory\"">NEW Story</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=create\"">Change Survey</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=content\"">Content</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=logout\"">Logout</a> |
I seriously stumped...
Where is the code for the wysiwyg editor itself, could this have anything
to do with it?
Also, the only other thing that I can think of is activate mutilanguage, and deleted all but english and french from the language files, could this make a difference?
Thanks in advance,
Spyrule
p.s. - please bring back mr. ninja emot  |
|
|
|
 |
montego

|
Posted:
Thu Sep 06, 2007 7:34 am |
|
Why is this line like this:
<strong><big>·</big></strong> <a href="\admin.php">Administration</a><br />
And not:
<strong><big>·</big></strong> <a href="admin.php">Administration</a><br />
I don't understand why you are including the extra "\" in it? Or, was that just a typo in the post. |
|
|
|
 |
spyrule

|
Posted:
Thu Sep 06, 2007 9:15 am |
|
Hey,
Well, as per your suggestions ...
This is what I edited it to :
Code:<strong><big>·</big></strong> <a href="admin.php">Administration</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=adminStory">NEW Story</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=create">Change Survey</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=content">Content</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=logout">Logout</a>
|
After saving it , and checking the source again with the editor :
Code:<strong><big>·</big></strong> <a href="\"admin.php\"">Administration</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=adminStory\"">NEW Story</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=create\"">Change Survey</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=content\"">Content</a><br />
<strong><big>·</big></strong> <a href="\"admin.php?op=logout\"">Logout</a>
|
This is what I get. So something is messing with the string generation when retreiving the links somehow. Because again when I check the Db (direct copy and paste from the content field) :
Code:<strong><big>·</big></strong> <a href="admin.php">Administration</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=adminStory">NEW Story</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=create">Change Survey</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=content">Content</a><br />
<strong><big>·</big></strong> <a href="admin.php?op=logout">Logout</a>
|
what could possibly cause this.... I am faaaar from being an expert in ravennuke to find out what is causing this.
a HUGE thanks in advance,
Spyrule |
|
|
|
 |
spyrule

|
Posted:
Thu Sep 06, 2007 9:16 am |
|
idea,
is their a way to add a strip quote function to just the adminblock() function ? |
|
|
|
 |
Gremmie

|
Posted:
Thu Sep 06, 2007 9:19 am |
|
So you are using the WYSIWYG editor to create the content for this block? Have you mashed down the Source button on the editor before typing in the HTML? |
|
|
|
 |
spyrule

|
Posted:
Thu Sep 06, 2007 10:01 am |
|
Yes, I am using the WYSIWYG editor, and yes I'm using the source button, with it locked down (none of the other menu options are available in this mode).
I've even tried editing it directly in the Db, to no effect or change in outcome. |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Thu Sep 06, 2007 4:07 pm |
|
Sounds like another issue of bad stripslashes/addslashes.
First thing I recommend is disabling magic_quotes_gpc and see if that fixes it. |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
|