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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user