Hallo Mario
Erstmal Danke für die Tipps in der PM zur Reinstallation von PageTeaser. Ich habe die Extension im BE gelöscht und dann noch das gesamte Verzeichnis von ce_page_teaser. Es gibt unter templates keine cd_page_teaser files inbesondere auch keine .xhtml. Aber auch nach Neuinstallation der Extension taucht der Fehler im FE auch bei neuen include Elementen auf.
Den DB-Dump (phpmyadmin) habe ich versucht auf Nicht-UTF Inhalte zu prüfen, habe aber nichts gefunden. Und zwar sowohl mit
PHP-Code:
mb_internal_encoding('UTF-8'); // always needed before mb_ functions, check note below if
if (mb_check_encoding($string,'UTF-8')) {
return true;
}
return false;
}
als auch mit der REGEXP, die wohl noch immer von WP benutzt wird. Die Erläuterungen waren auf stackoverflow
PHP-Code:
function seems_utf8($str) {
# Ist der Code von wordpress
# http://xref.yoast.com/3.0/nav.html?_functions/index.html
# get length, for utf8 this means bytes and not characters
$length = strlen($str);
# we need to check each byte in the string
for ($i=0; $i < $length; $i++) {
# get the byte code 0-255 of the i-th byte
$c = ord($str[$i]);
# utf8 characters can take 1-6 bytes, how much
# exactly is decoded in the first character if
# it has a character code >= 128 (highest bit set).
# For all <= 127 the ASCII is the same as UTF8.
# The number of bytes per character is stored in
# the highest bits of the first byte of the UTF8
# character. The bit pattern that must be matched
# for the different length are shown as comment.
#
# So $n will hold the number of additonal characters
if ($c < 0x80) $n = 0; # 0bbbbbbb
elseif (($c & 0xE0) == 0xC0) $n=1; # 110bbbbb
elseif (($c & 0xF0) == 0xE0) $n=2; # 1110bbbb
elseif (($c & 0xF8) == 0xF0) $n=3; # 11110bbb
elseif (($c & 0xFC) == 0xF8) $n=4; # 111110bb
elseif (($c & 0xFE) == 0xFC) $n=5; # 1111110b
else return false; # Does not match any model
# the code now checks the following additional bytes
# First in the if checks that the byte is really inside the
# string and running over the string end.
# The second just check that the highest two bits of all
# additonal bytes are always 1 and 0 (hexadecimal 0x80)
# which is a requirement for all additional UTF-8 bytes
for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?
if ((++$i == $length) || ((ord($str[$i]) & 0xC0) != 0x80))
return false;
}
}
return true;
}
Alle 9291 Zeilen gingen bei beiden Tests als UTF-8 konform durch.
Ich gebe Dir Recht, dass ich mir auch nicht vorstellen kann, warum der ce_page_teaser das Problem verursachen kann, aber
- Wenn ich im BE einen neues pt-Element anlage und SPEICHERE passiert nichts. Sobald ich aber SPEICHERN UND ... benutze, taucht die Fehlermeldung schon im contao-logfile auf.
- Wenn ich dann ein anderes beliebiges Element genau dieses Artikel im BE verwalte, erscheint der Fehler auch. Es liegt also also eher nicht in der Logik von ce_page_teaser, aber es passiert irgendwo irgendwas mit dem "Umfeld".
- Auch wenn ich alle extension deaktiviere ausser ce_page_teaser gibt's den Fehler im logfile.
Wenn jemand eine Idee hat, wie ich die in der der functions.php
die zeile 310
return htmlspecialchars($strString, ENT_COMPAT, $GLOBALS['TL_CONFIG']['characterSet'], false);
zu testzwecken manipulieren kann, um irgendwas verwertbares sehen zu können, wäre mir auch schon etwas weitergeholfen.
Lesezeichen