Sorry, I don't know what code to provide. I'm quite unfamiliar with how Post-Nuke work along with it's modules.
The Db name is correct, otherwise Post-Nuke would not work at all.
If I edit the row in the table from phpMyAdmin there is no problem.
Here is a part of the PHP code for htmlpages module that is used when updating/altering aa article:
------------------------------
/**
* modify an item
* This is a standard function that is called whenever an administrator
* wishes to modify a current module item
* @param 'pid' the id of the item to be modified
*/
function htmlpages_admin_modify($args)
{
// Get parameters from whatever input we need. All arguments to this
// function should be obtained from pnVarCleanFromInput(), getting them
// from other places such as the environment is not allowed, as that makes
// assumptions that will not hold in future versions of PostNuke
list($pid,
$objectid)= pnVarCleanFromInput('pid',
'objectid');
extract($args);
if (!empty($objecpid)) {
$pid = $objecpid;
}
// Create output object
$output = new pnHTML();
// Load API.
if (!pnModAPILoad('htmlpages', 'user')) {
$output->Text(_LOADFAILED);
return $output->GetOutput();
}
// The user API function is called.
$item = pnModAPIFunc('htmlpages',
'user',
'get',
array('pid' => $pid));
if ($item == false) {
$output->Text(_HTMLPAGESNOSUCHITEM);
return $output->GetOutput();
}
if (!pnSecAuthAction(0, 'htmlpages::', "$item[title]::$pid", ACCESS_EDIT)) {
$output->Text(_HTMLPAGESNOAUTH.$item['title'].$pid);
return $output->GetOutput();
}
// Add menu to output - it helps if all of the module pages have a standard
// menu at their head to aid in navigation
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->Text(htmlpages_adminmenu());
$output->SetInputMode(_PNH_PARSEINPUT);
// Title
$output->Title(_EDITHTMLPAGES);
// Start form
$output->FormStart(pnModURL('htmlpages', 'admin', 'update'));
// Add an authorisation ID
$output->FormHidden('authid', pnSecGenAuthKey());
$output->FormHidden('printlink', '0'); //need this otherwise will never reve
rt to 0
// Add a hidden variable for the item id. This needs to be passed on to
// the update function so that it knows which item for which item to carry
// out the update
$output->FormHidden('pid', pnVarPrepForDisplay($pid));
// Start the table that holds the information to be input.
$output->TableStart();
// TITLE
$row = array();
$output->SetOutputMode(_PNH_RETURNOUTPUT);
$row[] = $output->Text(pnVarPrepForDisplay(_HTMLPAGESTITLE));
$row[] = $output->FormText('title', pnVarPrepForDisplay($item['title']), 32,
128);
$output->SetOutputMode(_PNH_KEEPOUTPUT);
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->TableAddrow($row, 'left');
$output->SetInputMode(_PNH_PARSEINPUT);
// printlink
$row = array();
$output->SetOutputMode(_PNH_RETURNOUTPUT);
$row[] = $output->Text(pnVarPrepForDisplay(_HTMLPRINTLINK));
$row[] = $output->FormCheckbox('printlink', pnVarPrepForDisplay($item['print
link']),'1', 'checkbox');
$output->SetOutputMode(_PNH_KEEPOUTPUT);
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->TableAddrow($row, 'left');
$output->SetInputMode(_PNH_PARSEINPUT);
// UID
$row = array();
$output->FormHidden('uid', $item['uid']); //makes sure nonadmins can edit
$output->SetOutputMode(_PNH_RETURNOUTPUT);
// only admins can change userid's
if (pnSecAuthAction(0, 'htmlpages::', "$item[title]::$pid", ACCESS_ADMIN)) {
$row[] = $output->Text(pnVarPrepForDisplay(_HTMLPAGESUID));
$row[] = $output->FormText('uid', pnVarPrepForDisplay($item['uid']), 5,
5);
} else {
$row[] = $output->Text(pnVarPrepForDisplay(_HTMLPAGESUSER));
$row[] = $output->Text(pnVarPrepForDisplay(pnUserGetVar('uname')));
}
$output->SetOutputMode(_PNH_KEEPOUTPUT);
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->TableAddrow($row, 'left');
$output->SetInputMode(_PNH_PARSEINPUT);
// content
$row = array();
$output->SetOutputMode(_PNH_RETURNOUTPUT);
$row[] = $output->Text(pnVarPrepForDisplay(_HTMLPAGESCONTENT));
$row[] = $output->FormSubmit(_HTMLPAGESUPDATE);
$output->SetOutputMode(_PNH_KEEPOUTPUT);
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->TableAddrow($row, 'left');
$output->SetInputMode(_PNH_PARSEINPUT);
$output->TableEnd();
$output->FormTextArea('content', $item['content'],30,77);
// End form
$output->FormEnd();
// Return the output that has been generated by this function
return $output->GetOutput();
}
/**
* This is a standard function that is called with the results of the
* form supplied by htmlpages_admin_modify() to update a current item
* @param 'pid' the id of the item to be updated
* @param 'uid' the name of the item to be updated
* @param 'title' the name of the item to be updated
* @param 'content' the number of the item to be updated
*/
function htmlpages_admin_update($args)
{
// Get parameters from whatever input we need.
list($pid,
$uid,
$title,
$printlink,
$content) = pnVarCleanFromInput('pid',
'uid',
'title',
'printlink',
'content');
// User functions of this type can be called by other modules.
extract($args);
if (!pnSecConfirmAuthKey()) {
pnSessionSetVar('errormsg', _BADAUTHKEY);
pnRedirect(pnModURL('htmlpages', 'admin', 'view'));
return true;
}
// Load API.
if (!pnModAPILoad('htmlpages', 'admin')) {
pnSessionSetVar('errormsg', _LOADFAILED);
return $output->GetOutput();
}
// The API function is called.
if(pnModAPIFunc('htmlpages',
'admin',
'update',
array( 'pid' => $pid,
'uid' => $uid,
'title' => $title,
'printlink'=>$printlink,
'content'=> $content))) {
// Success
pnSessionSetVar('statusmsg', _HTMLPAGESUPDATED);
}
// This function generated no output, and so now it is complete we redirect
// the user to an appropriate page for them to carry on their work
pnRedirect(pnModURL('htmlpages', 'admin', 'view'));
// Return
return true;
}
---------------------------
Thanks
-tsltsl-