BUG 8558 Invalid HTML on Wrong Password Error page SOLVED
- It is observed that the error message comes duplicate one red and one black, the problem is that the message does not recognize the quotes, plus the xml type ShowMessage had defined the (type caption) no longer used. - first performed the escape sequence to make the red color is recognized, that in the generation of formPost file in the rafter is ShowMessage (type-caption) by its equivalent, (type-text) (mode-view).
This commit is contained in:
@@ -15,31 +15,31 @@
|
|||||||
define ( 'WS_USER_PASS', '{wsPass}' );
|
define ( 'WS_USER_PASS', '{wsPass}' );
|
||||||
define ( 'WS_ROUNDROBIN', '{wsRoundRobin}' );
|
define ( 'WS_ROUNDROBIN', '{wsRoundRobin}' );
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@include_once ( "wsClient.php" );
|
@include_once ( "wsClient.php" );
|
||||||
|
|
||||||
if ( !function_exists('ws_open') ){
|
if ( !function_exists('ws_open') ){
|
||||||
throw ( new Exception ('function ws_open() is not defined. File wsClient.php is missing') );
|
throw ( new Exception ('function ws_open() is not defined. File wsClient.php is missing') );
|
||||||
}
|
}
|
||||||
$oForm = new Form ( '{processUid}' . '/' . '{dynaformUid}', PATH_DYNAFORM );
|
$oForm = new Form ( '{processUid}' . '/' . '{dynaformUid}', PATH_DYNAFORM );
|
||||||
$oForm->validatePost();
|
$oForm->validatePost();
|
||||||
|
|
||||||
ws_open ();
|
ws_open ();
|
||||||
$result = ws_newCase ( '{processUid}', '{taskUid}', convertFormToWSObjects($_POST['form']) );
|
$result = ws_newCase ( '{processUid}', '{taskUid}', convertFormToWSObjects($_POST['form']) );
|
||||||
|
|
||||||
if( $result->status_code == 0 ) {
|
if( $result->status_code == 0 ) {
|
||||||
$caseId = $result->caseId;
|
$caseId = $result->caseId;
|
||||||
$caseNr = $result->caseNumber;
|
$caseNr = $result->caseNumber;
|
||||||
{USR_VAR}
|
{USR_VAR}
|
||||||
|
|
||||||
#save files
|
#save files
|
||||||
if ( isset($_FILES['form']) ) {
|
if ( isset($_FILES['form']) ) {
|
||||||
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
|
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
|
||||||
if ( $_FILES['form']['error'][$sFieldName] == 0 ){
|
if ( $_FILES['form']['error'][$sFieldName] == 0 ){
|
||||||
file_put_contents(G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName], file_get_contents($_FILES['form']['tmp_name'][$sFieldName]));
|
file_put_contents(G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName], file_get_contents($_FILES['form']['tmp_name'][$sFieldName]));
|
||||||
$fpath = G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName];
|
$fpath = G::getSysTemDir().PATH_SEP.$_FILES['form']['name'][$sFieldName];
|
||||||
|
|
||||||
if( isset($_POST['INPUTS'][$sFieldName]) && $_POST['INPUTS'][$sFieldName] != '' ){ #input file type
|
if( isset($_POST['INPUTS'][$sFieldName]) && $_POST['INPUTS'][$sFieldName] != '' ){ #input file type
|
||||||
ws_sendFile($fpath, $USR_UID, $caseId, 1, $_POST['INPUTS'][$sFieldName]);
|
ws_sendFile($fpath, $USR_UID, $caseId, 1, $_POST['INPUTS'][$sFieldName]);
|
||||||
} else { #attached file type
|
} else { #attached file type
|
||||||
ws_sendFile($fpath, $USR_UID, $caseId);
|
ws_sendFile($fpath, $USR_UID, $caseId);
|
||||||
@@ -55,26 +55,24 @@
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
$aMessage['MESSAGE'] = '<font color="red">An error occurred while the application was being processed.<br/>
|
$aMessage['MESSAGE'] = '<font color="red">An error occurred while the application was being processed.<br/>
|
||||||
Error code: '.$result->status_code.'<br/>
|
Error code: '.$result->status_code.'<br/>
|
||||||
Error message: '.$result->message.'</font><br/><br/>
|
Error message: '.$result->message.'</font><br/><br/>
|
||||||
<b>please contact to your system administrator.</b>';
|
<b>please contact to your system administrator.</b>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* by default show the case info, for the recently created case
|
* by default show the case info, for the recently created case
|
||||||
* you can change it or redirect to another page
|
* you can change it or redirect to another page
|
||||||
* i.e. G::header( 'Location: http://www.processmaker.com' );
|
* i.e. G::header( 'Location: http://www.processmaker.com' );
|
||||||
*/
|
*/
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher;
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', $aMessage );
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfo', '', $aMessage );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
}
|
}
|
||||||
catch ( Exception $e ) {
|
catch ( Exception $e ) {
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher;
|
||||||
$suggest_message = "This web entry should be regenerated, please contact to your system administrator.";
|
$suggest_message = "This web entry should be regenerated, please contact to your system administrator.";
|
||||||
$aMessage['MESSAGE'] = '<font color="red"><pre>'.$e->getMessage().'</pre>'.$suggest_message .'</font>';
|
$aMessage['MESSAGE'] = '<font color=\'red\'><pre>'.$e->getMessage().'</pre>'.$suggest_message .'</font>';
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<TITLE type="title">
|
<TITLE type="title">
|
||||||
<en>Error</en>
|
<en>Error</en>
|
||||||
</TITLE>
|
</TITLE>
|
||||||
<MESSAGE type="caption" enableHTML="1">
|
<MESSAGE type="text" enableHtml="1" mode="view">
|
||||||
<en/>
|
<en/>
|
||||||
</MESSAGE>
|
</MESSAGE>
|
||||||
</dynaForm>
|
</dynaForm>
|
||||||
Reference in New Issue
Block a user