Hallo
Ich habe die Deutsch als Standard Webseitenspache und noch drei weitere Webseitensprachen erzeugt.
Die Umschaltung funktioniert auch in den Extensions.
Doch wenn ich nun bei einer Seite ein Seiteninhalt "Alternative Webseiten Sprache" erstelle, geht dies aber ab der zweiten kommt die Fehlermeldung:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /local/share/www.domain.com/htdocs/fileadmin/website_files/my_languagemenu.php on line 42
Warning: Cannot modify header information - headers already sent by (output started at /local/share/www.domain.com/htdocs/fileadmin/website_files/my_languagemenu.php:42) in /local/share/www.domain.com/htdocs/tslib/class.tslib_fe.php on line 2402
Das php-Script ist aber korrekt (funktioniert bei anderen Typo3's einwandfrei) wenn ich nun die zweite zusätzliche Alternative Webseiten Sparche lösche verschwindet die Fehlermeldung auch wieder.
Es sieht nach einem Datenbankfehler aus (arbeite mit Mysql 4.1.8-) das giebt hin und wieder Probleme wegen den SQL Befehlen von Typo3.
Hat jemand eine Idee woran das liegen könnte?
Vielen Dank
Gruss
Lars
was steht in der my_languagemenu.php??
Hallo Dander
Ich habe nun dem Fehler etwas mehr auf den Zahn gefühlt.
Das Problem ist die Datenbank Tabelle: "pages_language_overlay" wenn ich da einen zweiten Eintrag mache (Egal welche Seite und welche Sprache) kommt diese Fehlermeldung.
Nun das my_languagemenu.php:
<?php
/***************************************************************
* Copyright notice
*
* (c) 1999-2002 Kasper Skårhøj (kasper@typo3.com)
* All rights reserved
*
* This script is part of the Typo3 project. The Typo3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* example_languageMenu.php
*
* THIS IS AN EXAMPLE designed to work with the official Typo3 testsite, section "Another site in the ..."
*
* @author Kasper Skårhøj <kasper@typo3.com>
*/
if (!is_object($this)) die ('Error: No parent object present.');
// First, select all pages_language_overlay records on the current page. Each represents a possibility for a language.
$query = "SELECT * FROM pages_language_overlay WHERE pid=".$GLOBALS["TSFE"]->id.$GLOBALS["TSFE"]->sys_page->enableFields("pages_language_overlay")." GROUP BY sys_language_uid";
$res = mysql(TYPO3_db,$query);
$langArr=array();
while($row=mysql_fetch_assoc($res)) {
$langArr[$row["sys_language_uid"]]=$row["title"];
}
// Little red arrow, which is inserted to the left of the flag-icon if the TSFE->sys_language_uid equals the language uid (notice that 0=english, 1=danish and 2=german is SPECIFIC to this database, because these numbers refer to uid's of the table sys_language)
// $pointer = '<img src="t3lib/gfx/content_client.gif" width="7" height="10" align=middle>';
$pointer = '';
// Set each icon. If the language is the current, red arrow is printed to the left. If the language is NOT found (represented by a pages_language_overlay record on this page), the icon is dimmed.
$flags = array();
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==0?$pointer:"").'<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=0" id="sprache" target=_top>deutsch</a><font color="#ffffff"> | </font>';
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==1?$pointer:"").'<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=1" id="sprache" target=_top>english</a><font color="#ffffff"> | </font>';
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==2?$pointer:"").'<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=2" id="sprache" target=_top>français</a><font color="#ffffff"> | </font>';
$flags[] = ($GLOBALS["TSFE"]->sys_language_uid==3?$pointer:"").'<a href="index.php?id='.$GLOBALS["TSFE"]->id.'&L=3" id="sprache" target=_top>italiano</a>';
// Make the little menu. Notice, the menu does ONLY transfer the page-id and the "L" variable (which is also SPECIFIC for this website because "L" has been used in the extension template used to control the language setup)
$content = ''.implode("",$flags).'';
// $content = '<table border=0 cellpadding=0 cellspacing=0><tr><td><img src=clear.gif width=30 height=1></td><td>'.implode("",$flags).'</td></</tr></table>';
?>
Kannst du mir helfen?
Gruss Lars
die stimmt soweit
mach mal ein dbcheck im install tool
Habe ich gemacht, der findet nichts!
Hallo
Für alle die es interessiert.
Das Problem resp. die Fehlermeldung entstand durch falsche Zugriffsrechte auf die MySQL Datenbank, die wiederum waren auf einen defekten RAID-Controller zurückzuführen.
Wer hätte das gedacht, war also ein Hardware Problem.
Gruss
Lars