Ich erhalte diese Fehlermeldung immer wenn ich im Bearbeitungsmodus eines Artikels auf "Headline", "Save" oder "Text HTML" klicke.
Die Änderungen in der Datei include.con_editcontent.php hab ich durchgeführt, so dass die Funktion folgendermaßen aufgerufen wird:Fatal error: Cannot redeclare conmakearticleindex() (previously declared in /var/www/vhosts/xxx.de/xxx/contenido/includes/functions.con.php:624) in /var/www/vhosts/xxx.de/xxx/contenido/includes/functions.con.php on line 624
Code: Alles auswählen
if ( isset($idcat) ) {
if( $action == 20 || $action == 10 ) {
if( $data != "" ) {
$data = explode("||", substr($data, 0, -2));
foreach($data as $value){
$value = explode("|", $value);
if ( $value[3] == "%$%EMPTY%$%" ){
$value[3] = "";
} else {
$value[3] = str_replace("%$%SEPERATOR%$%", "|", $value[3]);
}
conSaveContentEntry($value[0], "CMS_".$value[1], $value[2], $value[3]);
//echo "conSaveContentEntry({$value[0]}, CMS_{$value[1]}, {$value[2]}, value)<br>\n";
}
// restore orginal values
$data = $_REQUEST['data'];
$value = $_REQUEST['value'];
conGenerateCodeForArtInAllCategories($idart);
conMakeArticleIndex ( $idart );
}
}
Code: Alles auswählen
conMakeArticleIndex ( $idart );
Die passende Funktion zu dem Aufruf habe ich natürlich in die Datei functions.con.php eingepflegt:
Code: Alles auswählen
/**
* generate index of article content
*
* added by stese
* removed from function conSaveContentEntry before
* Touch the article to update last modified date
*
* @see conSaveContentEntry
* @param integer $idart
*/
function conMakeArticleIndex ( $idart ) {
global $db, $auth, $cfg, $cfgClient, $client, $lang, $_cecRegistry;
# generate index of article content
$oIndex = new Index($db);
$aOptions = array("img", "link", "linktarget", "swf"); // cms types to be excluded from indexing
# indexing an article depends on the complete content with all content types, i.e it can not by differentiated by specific content types.
# Therefore one must fetch the complete content arrray.
$sql = "SELECT idartlang FROM ".$cfg["tab"]["art_lang"]." WHERE idart = ".$idart." AND idlang = ".$lang." ";
$db->query($sql);
if ($db->next_record())
{
$aContent = conGetContentFromArticle($db->f('idartlang'));
$oIndex->start($idart, $aContent, 'auto', $aOptions);
}
}
/* Touch the article to update last modified date */
$lastmodified = date("Y-m-d H:i:s");
$sql = "UPDATE
".$cfg["tab"]["art_lang"]."
SET
lastmodified = '$lastmodified',
modifiedby = '$author'
WHERE
idartlang='$idartlang'";
$db->query($sql);
}
PS:Hab auch noch ne andere Domain mit Contenido auf dem gleichen Server Installiert, da besteht das Problem nicht...