Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues
Author Message
bobbyg
Worker
Worker


Joined: Dec 05, 2007
Posts: 212
Location: Tampa, Florida

PostPosted: Thu Feb 28, 2008 8:46 am Reply with quote

When trying to add a new category it creates a record with blank category. Same with sub-category. When trying to validate a new web link get the error of ERROR: You need to type a TITLE for your URL!
even though there is a title in the record.
 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


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

PostPosted: Thu Feb 28, 2008 8:50 am Reply with quote

Would this be a news category, Content category, Weblinks category or something else?
 
View user's profile Send private message Send e-mail
bobbyg
PostPosted: Thu Feb 28, 2008 8:53 am Reply with quote

The web links category in the web links module
 
Guardian2003
PostPosted: Thu Feb 28, 2008 8:59 am Reply with quote

Checking them...
 
Guardian2003
PostPosted: Thu Feb 28, 2008 9:05 am Reply with quote

I have just created a category, then a sub-category of the main ctegory, entered a weblink and am not seeing any problems.
Is this a clean install or an upgrade from a different version of RavenNuke.
 
bobbyg
PostPosted: Thu Feb 28, 2008 9:12 am Reply with quote

upgrade. This worked in 2.10. This is first time I tried to add a category, sub category after upgrade. I added category using phpmyadmin and then tried to add link as a user. Link added ok but the validation in the admin section gave me the title error.
 
Guardian2003
PostPosted: Thu Feb 28, 2008 9:28 am Reply with quote

The weblinks table is linked to other tables so trying to insert categories or other data directly into the table isn't a good idea (as you have found) unless you know the relationship of the data to other tables.

I'm assuming you do not have any other data in there as you said this is the first time you have created a category and you cannot add any links until a category is created.

Go back into phpMyAdmin and just remove the row of data from the table - this should get rid of your problem Smile
 
bobbyg
PostPosted: Thu Feb 28, 2008 9:52 am Reply with quote

I only inserted directly into the table when the add category came up with a record with a blank title and I only corrected that blank record.

After your post I:
1 deleted the new category and sub category
2 went to admin to add a main category
3 the add created a new record with a blank title (this will happen with sub cat also)
 
bobbyg
PostPosted: Thu Feb 28, 2008 10:01 am Reply with quote

The new category I tried to add was "Education"
The record added to the table has a blank title
But if I go back to the add new category and try to add "Education"
it says it already exists even though the title of the record is blank.
 
Guardian2003
PostPosted: Thu Feb 28, 2008 10:20 am Reply with quote

I'm not sure where you are getting "title" from. That is only use when adding a link but you first have to create a category.
When adding a category you only need to put in the name of the category 'Education' in your case and then the decription of the category after it.
You cannot add a category and a link at the same time as there are two distinct 'submit' buttons which perform two different operations.
 
bobbyg
PostPosted: Thu Feb 28, 2008 10:36 am Reply with quote

I know you cannot add a link at the same time. I added a main category, then a sub category, then a link. That is how I used it in 20.10 but the two section below are placing a record in the nuke_links_categories database that is blank.



OpenTable();
echo "<form method=\"post\" action=\"".$admin_file.".php\">"
."<font class=\"option\"><b>" . _ADDMAINCATEGORY . "</b></font><br /><br />"
."" . _NAME . ": <input type=\"text\" name=\"title\" size=\"30\" maxlength=\"100\" /><br />"
."" . _DESCRIPTION . ":<br /><textarea name=\"cdescription\" cols=\"60\" rows=\"10\"></textarea><br />"
."<input type=\"hidden\" name=\"op\" value=\"LinksAddCat\" />"
."<input type=\"submit\" value=\"" . _ADD . "\" /><br />"
."</form>";
CloseTable();
echo "<br />";

// Add a New Sub-Category
$result6 = $db->sql_query("SELECT * from " . $prefix . "_links_categories");
$numrows = $db->sql_numrows($result6);
if ($numrows>0) {
OpenTable();
echo "<form method=\"post\" action=\"".$admin_file.".php\">"
."<font class=\"option\"><b>" . _ADDSUBCATEGORY . "</b></font><br /><br />"
."" . _NAME . ": <input type=\"text\" name=\"title\" size=\"30\" maxlength=\"100\" />&nbsp;" . _IN . "&nbsp;";
$result7 = $db->sql_query("SELECT cid, title, parentid from " . $prefix . "_links_categories order by parentid,title");
echo "<select name=\"cid\">";
while($row7 = $db->sql_fetchrow($result7)) {
$cid2 = intval($row7['cid']);
$ctitle2 = stripslashes($row7['title']);
$parentid2 = intval($row7['parentid']);
if ($parentid2!=0) $ctitle2=getparent($parentid2,$ctitle2);
echo "<option value=\"$cid2\">$ctitle2</option>";
}
echo "</select><br />"
."" . _DESCRIPTION . ":<br /><textarea name=\"cdescription\" cols=\"60\" rows=\"10\"></textarea><br />"
."<input type=\"hidden\" name=\"op\" value=\"LinksAddSubCat\" />"
."<input type=\"submit\" value=\"" . _ADD . "\" /><br />"
."</form>";
CloseTable();
echo "<br />";
} else {
}
 
Guardian2003
PostPosted: Thu Feb 28, 2008 10:51 am Reply with quote

Sorry I just don't have the time to look at this any further today and I am not able to repoduce the problem on my two test sites.
 
bobbyg
PostPosted: Thu Feb 28, 2008 11:03 am Reply with quote

Thanks for trying Guardian -- I was hoping someone new of some type of change that would have caused this. I did not activate shortlinks -- and that was the only change that I could think of that would have any effect on web_links.
 
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Thu Feb 28, 2008 11:19 am Reply with quote

Strange - on my test site, it keeps try to add a category or subcategory called Projects - regardless of what I enter at the cat / subcat title.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
kguske
PostPosted: Thu Feb 28, 2008 11:38 am Reply with quote

Something's clobbering the title variable, but I can't see how when comparing 2.20 to 2.10.01.

I did find another issue that affects searches, but not adding categories.
 
kguske
PostPosted: Thu Feb 28, 2008 11:58 am Reply with quote

OK. Some progress. I removed an include of a NukeProject file from my test site, and was able to duplicate the blank title. Definitely something outside the module is messing with the variable. Maybe related to dynamic titles? Let me turn that off and see what happens.
 
kguske
PostPosted: Thu Feb 28, 2008 12:08 pm Reply with quote

Found!

Something in my NukeProject admin files was overwriting the $title variable. When I renamed the modules/Projects/admin directory to admin2 and retested, the problem went away.

So, bobbyg, what additional modules do YOU have loaded? (that explains why Guardian doesn't see it - because his test site only include the included modules - the same reason why we didn't catch it during testing).

Let me see if I can come up with a solution that allows other modules to be used without impacting web_links. I would also bet the same it true for downloads...
 
kguske
PostPosted: Thu Feb 28, 2008 12:13 pm Reply with quote

Here's the offending code in modules/Project/admin/links.php:
Code:
list($title, $admins) = $db->sql_fetchrow($query);


Here's the whole file:
Code:
<?php


/********************************************************/
/* NukeProject(tm)                                      */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/

global $admin_file;
if(!$admin_file OR $admin_file == "") { $admin_file = "admin"; }
if(!defined('ADMIN_FILE')) { die("Illegal Access Detected!!!"); }
$modname = $pj_config['location'];
$aid = substr($aid, 0,25);
$query = $db->sql_query("SELECT `title`, `admins` FROM `".$prefix."_modules` WHERE `title`='$modname'");
list($title, $admins) = $db->sql_fetchrow($query);
$db->sql_freeresult($query);
$query2 = $db->sql_query("SELECT `name`, `radminsuper` FROM `".$prefix."_authors` WHERE `aid`='$aid'");
list($rname, $radminsuper) = $db->sql_fetchrow($query2);
$db->sql_freeresult($query2);
$admins = explode(",", $admins);
$auth_user = 0;
for($i=0; $i < sizeof($admins); $i++) { if($rname == $admins[$i] AND !empty($admins)) { $auth_user = 1; } }
if($radminsuper == 1 || $auth_user == 1) {
  adminmenu($admin_file.".php?op=PJMain", _PJ_TITLE, "nukeproject.png");
}

?>

Unfortunately, the variable is populated - but isn't used (i.e. it doesn't need to be modified in this file). Still, it's easier to "fix" web_links to avoid this than to try to identify all possible scenarios of additional addons that cause this same problem...
 
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Thu Feb 28, 2008 12:34 pm Reply with quote

Is this file included on every page load or something? How does code in another module affect web_links?

_________________
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 
View user's profile Send private message
bobbyg
PostPosted: Thu Feb 28, 2008 1:09 pm Reply with quote

kguske wrote:
Found!

Something in my NukeProject admin files was overwriting the $title variable. When I renamed the modules/Projects/admin directory to admin2 and retested, the problem went away.

So, bobbyg, what additional modules do YOU have loaded? (that explains why Guardian doesn't see it - because his test site only include the included modules - the same reason why we didn't catch it during testing).

Let me see if I can come up with a solution that allows other modules to be used without impacting web_links. I would also bet the same it true for downloads...


That is the problem. I had added work request & probe successfully. The work project did not work and caused other problems so I did not complete the installation of it until I could look into it further. So apparently it is causing more problems with web link also.
 
kguske
PostPosted: Thu Feb 28, 2008 1:29 pm Reply with quote

It's code in the admin file of another module, which gets loaded when displaying the links admin page.

Here is a Only registered users can see links on this board! Get registered or login! for the web_links admin (modules/Web_Links/admin/index.php).

I tested most functions, but want others to test before I add to SVN.
 
Gremmie
PostPosted: Thu Feb 28, 2008 2:02 pm Reply with quote

Oh I see. Yeah, duh. I hate that Nuke admin architecture of running through everybody's case and links files all the time. Stoooopid.
 
bobbyg
PostPosted: Thu Feb 28, 2008 2:02 pm Reply with quote

That solved the problem I was having with web links.
Now I can try and figure what is wrong with projects.
 
kguske
PostPosted: Thu Feb 28, 2008 2:06 pm Reply with quote

I believe the problem would have occurred with adding links, changing categories and links, etc., so I changed quite a few things. Please test everything related to links admin.
 
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Thu Feb 28, 2008 2:56 pm Reply with quote

I believe this is an old problem with Nuke Project that has reared it's head again: Only registered users can see links on this board! Get registered or login!

It appears that it may affect other modules too.
 
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 -> RN v2.20.00 - All Issues

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 ©