es gibt einige CONTENIDO Installationen, die immer noch mit folgender Einstellung (in der Datei "contenido/includes/config.php") laufen:
Code: Alles auswählen
$cfg["is_start_compatible"] = true;
In CONTENIDO 4.9 wurde dies entfernt, das Setup kümmert sich um den Wechsel. Es gibt aber Plugins, die den alten Modus nicht unterstützen. Das AMR-Plugin z. B. läuft nicht richtig im Modus "$cfg["is_start_compatible"] = true;", URLs in Navigationen können nicht korrekt generiert werden.
Man kann das aber einfach umstellen, im Folgenden werden die einzelnen Schritte dazu erklärt:
Die Datei "contenido/includes/config.php" öffnen und die Konfiguration "is_start_compatible" ändern in
Code: Alles auswählen
$cfg["is_start_compatible"] = false;
Code: Alles auswählen
/**
* Function to convert old start article configuration to new style.
*
* In former CONTENIDO versions (4.6 or earlier) start articles were
* stored in table con_cat_art.is_start.
* Since 4.6 start articles are stored con_cat_lang.startidartlang.
*
* This function takes the start articles from con_cat_art.is_start and
* sets them in con_cat_lang.startidartlang for all available languages.
*/
function conAdminRemoveIsStartCompatibility() {
global $cfg;
$db = new DB_Contenido();
$db2 = new DB_Contenido();
// Get all languages
$aLang = array();
$sql = "SELECT idlang FROM " . $cfg["tab"]["lang"];
$db->query($sql);
while ($db->next_record()) {
$aLang[] = (int) $db->f("idlang");
}
// Get all old start article configurations
$sql = "SELECT idart, idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE is_start = 1";
$db->query($sql);
while ($db->next_record()) {
$startidart = (int) $db->f("idart");
$idcat = (int) $db->f("idcat");
foreach ($aLang as $pos => $vlang) {
$vlang = (int) $vlang;
// Convert old start article to entry new configuration
$sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] . " WHERE idart = " . $startidart . " AND idlang = " . $vlang;
$db2->query($sql);
if ($db2->next_record()) {
$idartlang = (int) $db2->f("idartlang");
$sql = "UPDATE " . $cfg["tab"]["cat_lang"] . " SET startidartlang = " . $idartlang . " WHERE idcat = " . $idcat . " AND idlang= " . $vlang;
$db2->query($sql);
}
}
}
// Delete old start article configurations
$sql = "UPDATE " . $cfg["tab"]["cat_art"] . " SET is_start = 0";
$db->query($sql);
}
// Now invoke the function to run the conversion
conAdminRemoveIsStartCompatibility();
Macht aber sicherheitshalber vorher eine Sicherung der Datenbank.
Grüße
xmurrix