BUG 6594 Error "Column 'APP_TAS_TITLE' cannot be null" when... SOLVED
- The problem is fixed for this field of APP_CACHE_VIEW table - language combobox was removed from cases list cache builed in ADMIN, because the decided that appcacheview olny generate cache for english language -
This commit is contained in:
@@ -325,4 +325,21 @@ class Content extends BaseContent {
|
||||
}
|
||||
return $aRoles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the if content on teh current language exists for the base language 'english
|
||||
* if not copy for it.
|
||||
*
|
||||
* @autor Erik Amaru Ortiz <erik@colosa.com>
|
||||
* @param $category
|
||||
* @param $id
|
||||
* @param $value
|
||||
*/
|
||||
function copyContentOnBaseLanguageIfNotExists($category, $id, $value)
|
||||
{
|
||||
$con = ContentPeer::retrieveByPk($category, '', $id, 'en');
|
||||
if ($con === null) {
|
||||
Content::addContent($category, '', $id, 'en', $value);
|
||||
}
|
||||
}
|
||||
} // Content
|
||||
|
||||
@@ -81,6 +81,10 @@ class Dynaform extends BaseDynaform {
|
||||
if ($this->dyn_title !== $v || $v === '') {
|
||||
$this->dyn_title = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('DYN_TITLE', $this->getDynUid(), $this->dyn_title);
|
||||
|
||||
$res = Content::addContent( 'DYN_TITLE', '', $this->getDynUid(), $lang, $this->dyn_title );
|
||||
}
|
||||
|
||||
@@ -126,6 +130,10 @@ class Dynaform extends BaseDynaform {
|
||||
if ($this->dyn_description !== $v || $v === '') {
|
||||
$this->dyn_description = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('DYN_DESCRIPTION', $this->getDynUid(), $this->dyn_description);
|
||||
|
||||
$res = Content::addContent( 'DYN_DESCRIPTION', '', $this->getDynUid(), $lang, $this->dyn_description );
|
||||
}
|
||||
|
||||
|
||||
@@ -244,6 +244,10 @@ class InputDocument extends BaseInputDocument {
|
||||
if ($this->inp_doc_title !== $sValue || $sValue === '') {
|
||||
try {
|
||||
$this->inp_doc_title = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('INP_DOC_TITLE', $this->getInpDocUid(), $this->inp_doc_title);
|
||||
|
||||
$iResult = Content::addContent('INP_DOC_TITLE', '', $this->getInpDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->inp_doc_title);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
@@ -284,6 +288,10 @@ class InputDocument extends BaseInputDocument {
|
||||
if ($this->inp_doc_description !== $sValue || $sValue === '') {
|
||||
try {
|
||||
$this->inp_doc_description = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('INP_DOC_DESCRIPTION', $this->getInpDocUid(), $this->inp_doc_description);
|
||||
|
||||
$iResult = Content::addContent('INP_DOC_DESCRIPTION', '', $this->getInpDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->inp_doc_description);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
|
||||
@@ -290,6 +290,10 @@ class OutputDocument extends BaseOutputDocument {
|
||||
if ($this->out_doc_title !== $sValue || $sValue === '') {
|
||||
try {
|
||||
$this->out_doc_title = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('OUT_DOC_TITLE', $this->getOutDocUid(), $this->out_doc_title);
|
||||
|
||||
$iResult = Content::addContent('OUT_DOC_TITLE', '', $this->getOutDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->out_doc_title);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
@@ -330,6 +334,10 @@ class OutputDocument extends BaseOutputDocument {
|
||||
if ($this->out_doc_description !== $sValue || $sValue === '') {
|
||||
try {
|
||||
$this->out_doc_description = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('OUT_DOC_DESCRIPTION', $this->getOutDocUid(), $this->out_doc_description);
|
||||
|
||||
$iResult = Content::addContent('OUT_DOC_DESCRIPTION', '', $this->getOutDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->out_doc_description);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
|
||||
@@ -80,7 +80,11 @@ class Process extends BaseProcess {
|
||||
|
||||
if ($this->pro_title !== $v || $v === '') {
|
||||
$this->pro_title = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('PRO_TITLE', $this->getProUid(), $this->pro_title);
|
||||
|
||||
$res = Content::addContent( 'PRO_TITLE', '', $this->getProUid(), $lang, $this->pro_title );
|
||||
}
|
||||
|
||||
@@ -126,6 +130,10 @@ class Process extends BaseProcess {
|
||||
if ($this->pro_description !== $v || $v === '') {
|
||||
$this->pro_description = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('PRO_DESCRIPTION', $this->getProUid(), $this->pro_description);
|
||||
|
||||
$res = Content::addContent( 'PRO_DESCRIPTION', '', $this->getProUid(), $lang, $this->pro_description );
|
||||
}
|
||||
|
||||
@@ -137,7 +145,7 @@ class Process extends BaseProcess {
|
||||
* @param array $aData Fields with :
|
||||
* $aData['PRO_UID'] the process id
|
||||
* $aData['USR_UID'] the userid
|
||||
$aData['PRO_CATEGORY'] the id category
|
||||
* $aData['PRO_CATEGORY'] the id category
|
||||
* @return void
|
||||
*/
|
||||
|
||||
|
||||
@@ -224,6 +224,10 @@ function swimlanesElementsExists ( $sSwiEleUid ) {
|
||||
if ($this->swi_text !== $sValue || $sValue === '') {
|
||||
try {
|
||||
$this->swi_text = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('SWI_TEXT', $this->getSwiUid(), $this->swi_text);
|
||||
|
||||
$iResult = Content::addContent('SWI_TEXT', '', $this->getSwiUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->swi_text);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
|
||||
@@ -73,6 +73,10 @@ class Task extends BaseTask {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tas_title !== $v || $v==="") {
|
||||
$this->tas_title = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_TITLE', $this->getTasUid(), $this->tas_title);
|
||||
|
||||
$res = Content::addContent( 'TAS_TITLE', '', $this->getTasUid(), $lang, $this->tas_title );
|
||||
return $res;
|
||||
}
|
||||
@@ -111,6 +115,10 @@ class Task extends BaseTask {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tas_description !== $v || $v==="") {
|
||||
$this->tas_description = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DESCRIPTION', $this->getTasUid(), $this->tas_description);
|
||||
|
||||
$res = Content::addContent( 'TAS_DESCRIPTION', '', $this->getTasUid(), $lang, $this->tas_description );
|
||||
return $res;
|
||||
}
|
||||
@@ -149,6 +157,10 @@ class Task extends BaseTask {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tas_def_title !== $v || $v==="") {
|
||||
$this->tas_def_title = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_TITLE', $this->getTasUid(), $this->tas_def_title);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_TITLE', '', $this->getTasUid(), $lang, $this->tas_def_title );
|
||||
return $res;
|
||||
}
|
||||
@@ -187,6 +199,10 @@ class Task extends BaseTask {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tas_def_description !== $v || $v==="") {
|
||||
$this->tas_def_description = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_DESCRIPTION', $this->getTasUid(), $this->tas_def_description);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_DESCRIPTION', '', $this->getTasUid(), $lang, $this->tas_def_description );
|
||||
return $res;
|
||||
}
|
||||
@@ -225,6 +241,10 @@ class Task extends BaseTask {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tas_def_proc_code !== $v || $v==="") {
|
||||
$this->tas_def_proc_code = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_PROC_CODE', $this->getTasUid(), $this->tas_def_proc_code);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_PROC_CODE', '', $this->getTasUid(), $lang, $this->tas_def_proc_code );
|
||||
return $res;
|
||||
}
|
||||
@@ -264,6 +284,10 @@ class Task extends BaseTask {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tas_def_message !== $v || $v==="") {
|
||||
$this->tas_def_message = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_MESSAGE', $this->getTasUid(), $this->tas_def_message);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_MESSAGE', '', $this->getTasUid(), $lang, $this->tas_def_message );
|
||||
return $res;
|
||||
}
|
||||
@@ -307,6 +331,10 @@ class Task extends BaseTask {
|
||||
|
||||
if ($this->tas_def_subject_message !== $v || $v==="") {
|
||||
$this->tas_def_subject_message = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_SUBJECT_MESSAGE', $this->getTasUid(), $this->tas_def_subject_message);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_SUBJECT_MESSAGE', '', $this->getTasUid(), $lang, $this->tas_def_subject_message );
|
||||
|
||||
return $res;
|
||||
|
||||
@@ -73,6 +73,10 @@ class Triggers extends BaseTriggers {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tri_title !== $v || $v==="") {
|
||||
$this->tri_title = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TRI_TITLE', $this->getTriUid(), $this->tri_title);
|
||||
|
||||
$res = Content::addContent( 'TRI_TITLE', '', $this->getTriUid(), $lang, $this->tri_title );
|
||||
return $res;
|
||||
}
|
||||
@@ -111,6 +115,10 @@ class Triggers extends BaseTriggers {
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
if ($this->tri_description !== $v || $v==="") {
|
||||
$this->tri_description = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TRI_DESCRIPTION', $this->getTriUid(), $this->tri_description);
|
||||
|
||||
$res = Content::addContent( 'TRI_DESCRIPTION', '', $this->getTriUid(), $lang, $this->tri_description );
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ try {
|
||||
}
|
||||
catch ( Exception $e ){
|
||||
$aMessage = array();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$aMessage['MESSAGE'] = $e->getMessage() . '<br>'.$e->getTraceAsString();
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', 'blank');
|
||||
|
||||
@@ -128,7 +128,9 @@
|
||||
G::LoadClass('configuration');
|
||||
$conf = new Configurations;
|
||||
|
||||
$lang = $_POST['lang'];
|
||||
//DEPRECATED $lang = $_POST['lang'];
|
||||
//there is no more support for other languages that english
|
||||
$lang = 'en';
|
||||
|
||||
try {
|
||||
//setup the appcacheview object, and the path for the sql files
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
Ext.onReady(function() {
|
||||
|
||||
Ext.QuickTips.init();
|
||||
|
||||
// turn on validation errors beside the field globally
|
||||
Ext.form.Field.prototype.msgTarget = 'side';
|
||||
|
||||
var bd = Ext.getBody();
|
||||
|
||||
// bd.createChild({tag: 'h2', html: 'Form 2 - Adding fieldsets'});
|
||||
|
||||
|
||||
// Store
|
||||
var store = new Ext.data.Store( {
|
||||
proxy: new Ext.data.HttpProxy({
|
||||
@@ -61,72 +56,8 @@ Ext.onReady(function() {
|
||||
url : '',
|
||||
frame : true,
|
||||
title : ' ',
|
||||
bodyStyle : 'padding:5px 5px 0',
|
||||
width : 400,
|
||||
items : [ ]
|
||||
});
|
||||
|
||||
var fieldset;
|
||||
|
||||
var cmbLanguages = new Ext.form.ComboBox({
|
||||
fieldLabel : TRANSLATIONS.ID_CACHE_LANGUAGE, // 'Language'
|
||||
hiddenName : 'lang',
|
||||
store : new Ext.data.Store( {
|
||||
proxy : new Ext.data.HttpProxy( {
|
||||
url : 'appCacheViewAjax',
|
||||
method : 'POST'
|
||||
}),
|
||||
baseParams : {request : 'getLangList'},
|
||||
reader : new Ext.data.JsonReader( {
|
||||
root : 'rows',
|
||||
fields : [ {name : 'LAN_ID'}, {name : 'LAN_NAME'} ]
|
||||
})
|
||||
}),
|
||||
valueField : 'LAN_ID',
|
||||
displayField : 'LAN_NAME',
|
||||
//triggerAction : 'all',
|
||||
emptyText : 'Select',
|
||||
selectOnFocus : true,
|
||||
editable : false,
|
||||
allowBlank : false
|
||||
})
|
||||
|
||||
var txtUser = {
|
||||
id : 'txtUser',
|
||||
xtype: 'textfield',
|
||||
fieldLabel: TRANSLATIONS.ID_CACHE_USER, // 'User',
|
||||
disabled: false,
|
||||
name: 'user',
|
||||
value: ''
|
||||
};
|
||||
|
||||
var txtHost = {
|
||||
id : 'txtHost',
|
||||
xtype: 'textfield',
|
||||
fieldLabel: TRANSLATIONS.ID_CACHE_HOST, // 'Host',
|
||||
disabled: false,
|
||||
name: 'host',
|
||||
value: ''
|
||||
};
|
||||
|
||||
var txtPasswd = {
|
||||
id : 'txtPasswd',
|
||||
inputType: 'password',
|
||||
xtype:'textfield',
|
||||
fieldLabel: TRANSLATIONS.ID_CACHE_PASSWORD, // 'Password',
|
||||
disabled: false,
|
||||
hidden: false,
|
||||
value: ''
|
||||
}
|
||||
|
||||
fieldset = {
|
||||
xtype : 'fieldset',
|
||||
title : TRANSLATIONS.ID_CACHE_SUBTITLE_REBUILD, // 'Rebuild Workflow Application Cache',
|
||||
collapsible : false,
|
||||
autoHeight : true,
|
||||
defaults : { width : 170 },
|
||||
defaultType : 'textfield',
|
||||
items : [cmbLanguages],
|
||||
items : [ ],
|
||||
buttons : [{
|
||||
text : TRANSLATIONS.ID_CACHE_BTN_BUILD, // 'Build Cache',
|
||||
handler : function() {
|
||||
@@ -150,13 +81,41 @@ Ext.onReady(function() {
|
||||
});
|
||||
}
|
||||
}]
|
||||
}
|
||||
});
|
||||
|
||||
var txtUser = {
|
||||
id : 'txtUser',
|
||||
xtype: 'textfield',
|
||||
fieldLabel: TRANSLATIONS.ID_CACHE_USER, // 'User',
|
||||
disabled: false,
|
||||
name: 'user',
|
||||
allowBlank: false
|
||||
};
|
||||
|
||||
var txtHost = {
|
||||
id : 'txtHost',
|
||||
xtype: 'textfield',
|
||||
fieldLabel: TRANSLATIONS.ID_CACHE_HOST, // 'Host',
|
||||
disabled: false,
|
||||
name: 'host',
|
||||
allowBlank: false
|
||||
};
|
||||
|
||||
var txtPasswd = {
|
||||
id : 'txtPasswd',
|
||||
inputType: 'password',
|
||||
xtype:'textfield',
|
||||
fieldLabel: TRANSLATIONS.ID_CACHE_PASSWORD, // 'Password',
|
||||
disabled: false,
|
||||
hidden: false,
|
||||
value: ''
|
||||
}
|
||||
|
||||
fieldsetRoot = {
|
||||
xtype : 'fieldset',
|
||||
title : TRANSLATIONS.ID_CACHE_SUBTITLE_SETUP_DB, // 'Setup MySql Root Password',
|
||||
collapsible : false,
|
||||
collapsible : true,
|
||||
collapsed: true,
|
||||
autoHeight : true,
|
||||
defaults : { width : 170 },
|
||||
defaultType : 'textfield',
|
||||
@@ -164,6 +123,10 @@ Ext.onReady(function() {
|
||||
buttons : [{
|
||||
text : TRANSLATIONS.ID_CACHE_BTN_SETUP_PASSWRD, // 'Setup Password',
|
||||
handler : function() {
|
||||
if (!fsf.getForm().isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Ext.Msg.show ({ msg : TRANSLATIONS.ID_PROCESSING, wait:true,waitConfig: {interval:400} });
|
||||
Ext.Ajax.request({
|
||||
url: 'appCacheViewAjax',
|
||||
@@ -185,14 +148,9 @@ Ext.onReady(function() {
|
||||
}]
|
||||
}
|
||||
|
||||
fsf.add(fieldset);
|
||||
fsf.add(fieldsetRoot);
|
||||
fsf.render(document.getElementById('main-panel'));
|
||||
|
||||
//set the current language
|
||||
cmbLanguages.store.on('load',function(){ cmbLanguages.setValue ( currentLang ) });
|
||||
cmbLanguages.store.load();
|
||||
|
||||
//store.load(); instead call standard proxy we are calling ajax request, because we need to catch any error
|
||||
Ext.Ajax.request({
|
||||
url: 'appCacheViewAjax',
|
||||
|
||||
Reference in New Issue
Block a user