PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
bobbyg
Worker
Worker


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

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

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: 6373
Location: Vsetin, Czech Republic

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

Would this be a news category, Content category, Weblinks category or something else?
View user's profile Send private message Send e-mail Visit poster's website
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 8:53 am Reply with quote Back to top

The web links category in the web links module
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Thu Feb 28, 2008 8:59 am Reply with quote Back to top

Checking them...
View user's profile Send private message Send e-mail Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Thu Feb 28, 2008 9:05 am Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 9:12 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Thu Feb 28, 2008 9:28 am Reply with quote Back to top

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
View user's profile Send private message Send e-mail Visit poster's website
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 9:52 am Reply with quote Back to top

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)
View user's profile Send private message Visit poster's website
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 10:01 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Thu Feb 28, 2008 10:20 am Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 10:36 am Reply with quote Back to top

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 {
}
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Thu Feb 28, 2008 10:51 am Reply with quote Back to top

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.
View user's profile Send private message Send e-mail Visit poster's website
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 11:03 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

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

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.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Thu Feb 28, 2008 11:38 am Reply with quote Back to top

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.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Thu Feb 28, 2008 11:58 am Reply with quote Back to top

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.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Thu Feb 28, 2008 12:08 pm Reply with quote Back to top

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...
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Thu Feb 28, 2008 12:13 pm Reply with quote Back to top

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...
View user's profile Send private message
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 Back to top

Is this file included on every page load or something? How does code in another module affect web_links?
View user's profile Send private message
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 1:09 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Thu Feb 28, 2008 1:29 pm Reply with quote Back to top

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 to the forums!
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.
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


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

PostPosted: Thu Feb 28, 2008 2:02 pm Reply with quote Back to top

Oh I see. Yeah, duh. I hate that Nuke admin architecture of running through everybody's case and links files all the time. Stoooopid.
View user's profile Send private message
bobbyg
Worker
Worker


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

PostPosted: Thu Feb 28, 2008 2:02 pm Reply with quote Back to top

That solved the problem I was having with web links.
Now I can try and figure what is wrong with projects.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Thu Feb 28, 2008 2:06 pm Reply with quote Back to top

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.
View user's profile Send private message
jakec
Site Admin


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

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

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 to the forums!


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

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum