Wollte nur ein Bild einfügen
Wollte nur ein Bild einfügen
Sehr seltsam das ganze aber irgendwo habe ich ein Problem.
Wenn ich über den Wysiwig EDitor in den Content ein Bild einfüge und komischerweise habe ich das Problem erst jetzt und momentan nur bei einem Artikel, bekomme ich diesen Fehler im Errorlog:
[06-Jun-2006 09:25:44] /cms/front_content.php?idcat=104 MySQL error 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND b.idlang = 1 AND c.startidartlang != b.idartlang ORDER B
SELECT b.idart, b.title, b.summary, b.created, b.lastmodified, b.artsort, b.redirect_url, b.online, DATE_FORMAT(b.created, '%d.%m.%y') as erstellungsdatum, DATE_FORMAT(b.lastmodified, '%d.%m.%y') as aktualisierungsdatum FROM con_cat_art as a LEFT JOIN con_art_lang as b ON a.idart = b.idart LEFT JOIN con_cat_lang as c ON a.idcat = c.idcat WHERE a.idcat = AND b.idlang = 1 AND c.startidartlang != b.idartlang ORDER BY b.created DESC
[06-Jun-2006 09:25:44] /cms/front_content.php?idcat=104 next_record called with no query pending in Module ID 75.
Ich weiß überhaupt nicht wo ich suchen soll.
Hat jemand einen Tipp?
Danke
Wenn ich über den Wysiwig EDitor in den Content ein Bild einfüge und komischerweise habe ich das Problem erst jetzt und momentan nur bei einem Artikel, bekomme ich diesen Fehler im Errorlog:
[06-Jun-2006 09:25:44] /cms/front_content.php?idcat=104 MySQL error 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND b.idlang = 1 AND c.startidartlang != b.idartlang ORDER B
SELECT b.idart, b.title, b.summary, b.created, b.lastmodified, b.artsort, b.redirect_url, b.online, DATE_FORMAT(b.created, '%d.%m.%y') as erstellungsdatum, DATE_FORMAT(b.lastmodified, '%d.%m.%y') as aktualisierungsdatum FROM con_cat_art as a LEFT JOIN con_art_lang as b ON a.idart = b.idart LEFT JOIN con_cat_lang as c ON a.idcat = c.idcat WHERE a.idcat = AND b.idlang = 1 AND c.startidartlang != b.idartlang ORDER BY b.created DESC
[06-Jun-2006 09:25:44] /cms/front_content.php?idcat=104 next_record called with no query pending in Module ID 75.
Ich weiß überhaupt nicht wo ich suchen soll.
Hat jemand einen Tipp?
Danke
der fehler kommt aus einem modul...
durchsuch mal deine module im outbutbereich nach DATE_FORMAT
dann solltest du den übeltäter finden...
durchsuch mal deine module im outbutbereich nach DATE_FORMAT
dann solltest du den übeltäter finden...
*** make your own tools (wishlist :: thx)
Und das erscheint im Frontend
Und das erscheint im Frontend:
SELECT
*
FROM
con_upl
WHERE
filename REGEXP 'berater.gif'
Ist das Bild vieleicht zu groß?
hat aber nur 29 kb und ist aber 350x468 PIxel groß.
Vieleicht ist das ja ein Hinweis.
Zu sehen überigens hier:
http://www.tischlerei-koehler.de/cms/fr ... &idart=148
SELECT
*
FROM
con_upl
WHERE
filename REGEXP 'berater.gif'
Ist das Bild vieleicht zu groß?
hat aber nur 29 kb und ist aber 350x468 PIxel groß.
Vieleicht ist das ja ein Hinweis.
Zu sehen überigens hier:
http://www.tischlerei-koehler.de/cms/fr ... &idart=148
-
- Beiträge: 1536
- Registriert: Fr 20. Aug 2004, 10:07
- Kontaktdaten:
nein, auch bei jpg`s
nein, auch bei jpg`s
scheint aber ein Problem im News-modul von Andreas Lindner zu sein.
denn im Frontend erscheint ja der Fehler im Teaser rechts (Newsausgabe).
scheint aber ein Problem im News-modul von Andreas Lindner zu sein.
denn im Frontend erscheint ja der Fehler im Teaser rechts (Newsausgabe).
der output des News moduls
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : News
* Author(s) : Andreas Lindner, 4fb
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 12.08.2005
* updated : 27.02.2006
************************************************/
cInclude('classes', 'class.article.php');
cInclude('includes', 'functions.api.string.php');
cInclude('includes', 'functions.api.images.php');
if (!is_object($tpl)) {
$tpl = new Template;
}
$tpl->reset();
$sql = "SELECT
htmlpath, frontendpath
FROM
".$cfg["tab"]["clients"]."
WHERE
idclient = ".$client." ";
$db->query($sql);
if ($db->next_record()) {
$htmlpath = $db->f('htmlpath');
$frontendpath = $db->f('frontendpath');
}
// selected category
$selcat = "CMS_VALUE[1]";
//echo "sel $selcat<br>";
$template = "teaser-standard.html";
//echo "tpl $template<br>";
// anzahl der zeichen text
$mxtext = 70;
$limit = "CMS_VALUE[15]";
$cms_sort_direction = "CMS_VALUE[16]";
if ($cms_sort_direction == '') {
$cms_sort_direction = 'desc';
}
if ("CMS_VALUE[3]" == "sortdate") {
$order = 'lastmodified';
} else {
$order = 'artsort';
}
$newsheadline = "CMS_VALUE[4]";
$tpl->set('s', 'TITLE', $newsheadline);
if (strlen($selcat) > 0 AND $selcat != '0') {
$options = array ('idcat' => $selcat, "start" => false, "order" => $order, "direction" => $cms_sort_direction);
$list = new ArticleCollection($options);
$count = $list->count;
if ($count > 0) {
if (is_numeric($limit) AND strlen($limit) > 0) {
if ($limit < $list->count) {
$limit_art = $limit;
} else {
$limit_art = $list->count;
}
} else {
$limit_art = $list->count;
}
for ($i = 0; $i < $limit_art; $i ++) {
$article = $list->nextArticle();
$article_id = $article->getField('idart');
$article_lastmod = $article->getField('lastmodified');
$article_lastmod = strtotime($article_lastmod);
$article_lastmod = date('d.m.Y ', $article_lastmod);
$teaser_img = '';
if ($noimg != 'true') {
$text_html = $article->getContent('CMS_HTML', 1);
$regEx = "/<img[^>]*?>.*?/i";
$match = array ();
preg_match($regEx, $text_html, $match);
$regEx = "/(src)(=)(['\"]?)([^\"']*)(['\"]?)/i";
$img = array ();
preg_match($regEx, $match[0], $img);
$img_src = preg_split("/\//", $img[0]);
$img_name = $img_src[count($img_src) - 1];
$img_name = preg_replace("/\"/", "", $img_name);
$img_split = preg_split("/\./", $img_name);
$img_type = $img_split[count($img_split) - 1];
$img_split2 = preg_split("/_/", $img_split[0]);
$name = $img_name;
if (count($img_split2) > 1) {
$img_x = $img_split2[count($img_split2) - 1];
$img_y = $img_split2[count($img_split2) - 2];
if (is_numeric($img_x) AND is_numeric($img_y)) {
$suffix = "_".$img_x."_".$img_y.".".$img_type;
$name = preg_replace("/$suffix/", "", $img_name);
$name = $name.".[a-zA-Z]{3}";
}
}
$img_teaser = '';
if (strlen($name) > 0) {
$sql = "SELECT
*
FROM
".$cfg["tab"]["upl"]."
WHERE
filename REGEXP '$name' ";
echo "<pre>"; print_r($sql); echo "</pre>";
$db->query($sql);
if ($db->next_record()) {
$filename = $db->f('filename');
$dirname = $db->f('dirname');
}
$img_path = $cfgClient[$client]["upl"]["path"].$dirname.$filename;
$img_size = "CMS_VALUE[14]";
$img_teaser = capiImgScale($img_path, $img_size, $img_size, $crop = false, $expand = false, $cacheTime = 1000, $wantHQ = false);
} // end if strlen
if (strlen($img_teaser) > 0) {
$teaser_img = '<img src="'.$img_teaser.'" class="teaser_img">';
} else {
$teaser_img = '';
}
} // end if noimg
$headline = strip_tags($article->getContent('CMS_HTMLHEAD', 1));
$headline = str_replace($replace, " ", $headline);
/* $subheadline = strip_tags($article->getContent('CMS_HTMLHEAD', 2));
$subheadline = str_replace($replace, " ", $subheadline);*/
$teaserheadline = /*$subheadline." - ".*/
$headline;
$href = $sess->url("front_content.php?idcat=$selcat&idart=$article_id");
$teasertext = $article->getField('summary');
if (strlen(trim($teasertext)) == 0) {
$teasertext = strip_tags($article->getContent('CMS_HTML', 1));
$teasertext2 = $teasertext;
$teasertext = capiStrTrimAfterWord($teasertext, $mxtext);
if ($teasertext!=$teasertext2) {
$teasertext.= '...';
}
} // end if
$teasertext = $teasertext." ";
$tpl->set('d', 'HEADLINE', $teaserheadline);
$tpl->set('d', 'TEXT', $teasertext);
$tpl->set('d', 'HREF', $href);
$tpl->set('d', 'IMG', $teaser_img);
$tpl->set('d', 'DATE', $article_lastmod);
$tpl->set('d', 'MORE', mi18n("mehr"));
$tpl->next();
} // end for
$tpl->generate('templates/'.$template);
}
}
?>
solange . . .
so lange ich bei meinen News kein Bild in den Content eingefügt habe, war wohl alles okay.
Wenn ich ein Bild einfüge, kann es der Teaser offenbar nicht herausfiltern.
Will heißen, es soll ja auch im Teaser rechts nicht angezeigt werden, sondern nur wenn der newsartikel angeklickt wird.
Wenn ich ein Bild einfüge, kann es der Teaser offenbar nicht herausfiltern.
Will heißen, es soll ja auch im Teaser rechts nicht angezeigt werden, sondern nur wenn der newsartikel angeklickt wird.
zu dem zweiten was auf deinem bildschirm erscheint
nimm das aus dem obrigen modul raus
nimm das aus dem obrigen modul raus
Code: Alles auswählen
echo "<pre>"; print_r($sql); echo "</pre>";
*** make your own tools (wishlist :: thx)
Die SQL-Fehlermeldung dürfte aus dem Teaser-Modul kommen (bzw. einem anderen Modul, welches "aktualisierungsdatum" in der Abfrage verwendet).
Das Problem liegt hier:
Gruß
HerrB
Das Problem liegt hier:
Es fehlt die Angabe zur idcat. Wurde das Modul bzw. die Kategorie bzw. der Artikel konfiguriert?WHERE a.idcat = AND b.idlang = 1 AND
Gruß
HerrB
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
ist schon komisch
Habe also erst einmal nur den Code:
heraus kommentiert.
Jetzt funzt das Ganze und sogar ohne Fehlermeldung im errorlog.
Ich muss mal noch ein wenig herumprobieren.
Ich danke Euch ehrfürchtig
Ihr seid schon spitze!
Code: Alles auswählen
echo "<pre>"; print_r($sql); echo "</pre>";
Jetzt funzt das Ganze und sogar ohne Fehlermeldung im errorlog.
Ich muss mal noch ein wenig herumprobieren.
Ich danke Euch ehrfürchtig

Ihr seid schon spitze!