Artikelübersicht streikt - keine Artikel werden gelistet

FireCologne
Beiträge: 44
Registriert: Fr 7. Nov 2003, 23:53
Kontaktdaten:

Artikelübersicht streikt - keine Artikel werden gelistet

Beitrag von FireCologne »

Hallo zusammen,

ich verlasse mich mal wieder auf das gut funktioneirende Forum.

ich habe contenido 4.4.1. auf einen anderen server rübergeschaufelt.
datenbank exportiert und in die neue eingespielt. alle pfadangaben geändert etc.
das frontend läuft perfekt!

nun das problem:

unter content --> artikel erscheinen die artikel nicht. somit ist kein editieren möglich.

das errorlog gibt folgenden fehler aus:

Code: Alles auswählen

[21-Feb-2006 19:50:32] Invalid SQL: SELECT
			a.preid AS preid,
			a.postid AS postid,
			a.parentid AS parentid,
            c.idcat AS idcat,
            c.level AS level,
            b.name AS name,
            b.public AS public,
            b.visible AS online,
            d.idtpl AS idtpl
        FROM
            con_cat AS a,
            con_cat_lang AS b,
            con_cat_tree AS c
        LEFT JOIN
            con_template_conf AS d
            ON d.idtplcfg = b.idtplcfg
        WHERE
            a.idclient  = '1' AND
            b.idlang    = '1' AND
            c.idcat     = b.idcat AND
            b.idcat     = a.idcat
        ORDER BY
            c.idtree ASC<br><br>
[21-Feb-2006 19:50:32] next_record called with no query pending.
Habe das Forum 1 stunde lang abgegrast und finde keine lösung.

mittlerweile habe ich auf 4.6.4 geupdated. musste dabei die mysql prüfung umgehen, wegen der mangelnden kompatibilität und habe den bug zur mandantenänderung behoben.

aber immer noch bleibt der fehler mit der auflistung er artikel. keine liste - keine änderungen möglich - was nun?

wer hat eine idee?

DANKE!!
i-fekt
Beiträge: 1520
Registriert: Mo 3. Jan 2005, 02:15
Wohnort: Chemnitz
Kontaktdaten:

Beitrag von i-fekt »

Hast du mal geschaut, ob du wirklich alle Dateien auf den Server gespielt hast?
Beleuchtfix
Beiträge: 1082
Registriert: Di 22. Jul 2003, 10:14
Wohnort: Hessen
Kontaktdaten:

Beitrag von Beleuchtfix »

Bitte Anzahl der Tabellen vergleichen und Tabellengröße.
Viel Erfolg
Florian
FireCologne
Beiträge: 44
Registriert: Fr 7. Nov 2003, 23:53
Kontaktdaten:

fehler behoben

Beitrag von FireCologne »

hi zusammen,

danke für die tipps - habe den fehler gefunden. die mysql version 5.0.18 wird wohl noch nicht voll unterstützt. in einer php datei im includes ordner fehlten zwei klammern. das wars!

nun funzt es!
alfamaennchen
Beiträge: 38
Registriert: So 27. Mär 2005, 21:29
Kontaktdaten:

Beitrag von alfamaennchen »

Hab grad das gleiche Problem ...
würdest du mir sagen in welcher INCLUDE-Datei?

Danke
dschinn
Beiträge: 2
Registriert: Fr 24. Jan 2003, 11:14
Wohnort: Berlin
Kontaktdaten:

Beitrag von dschinn »

In diesem Fall ging es wahrscheinlich um die Datei include.con_str_overview.php.

Dem Quellcode müssen die Klammern hinzugefügt werden:

Code: Alles auswählen

$sql = "SELECT
			a.preid AS preid,
			a.postid AS postid,
			a.parentid AS parentid,
            c.idcat AS idcat,
            c.level AS level,
            b.name AS name,
            b.public AS public,
            b.visible AS online,
            d.idtpl AS idtpl
        FROM
   !----> (".$cfg["tab"]["cat"]." AS a,
            ".$cfg["tab"]["cat_lang"]." AS b,
            ".$cfg["tab"]["cat_tree"]." AS c) <------!
        LEFT JOIN
            ".$cfg["tab"]["tpl_conf"]." AS d
            ON !----> (d.idtplcfg = b.idtplcfg ) <------!
        WHERE
            a.idclient  = '".$client."' AND
            b.idlang    = '".$lang."' AND
            c.idcat     = b.idcat AND
            b.idcat     = a.idcat
        ORDER BY
            c.idtree ASC";
arakis
Beiträge: 81
Registriert: Di 18. Nov 2003, 16:27
Kontaktdaten:

Gleiche probs

Beitrag von arakis »

habe die gleichen probs - jedoch funkt das nicht mit den klammern..
könnte bitte jemand die gesamte:
datei:
include.con_art_overview.php
posten?

gibt es ein alternatives fix sofern die artikel nicht mehr gelistet werden?
freue mich über hilfe...

lg
arakis
Tom
Beiträge: 80
Registriert: Fr 20. Sep 2002, 21:47
Wohnort: Mülheim
Kontaktdaten:

Beitrag von Tom »

yep, funzt auch in meiner 5er mySQL umgebung. der trick ist, dass der o.g. codeschnipsel 2 mal vorkommt ... also, edit x 2 dann klappts auch mit der ansicht ...

danke und gruß
tom, der wieder artikel editieren kann :D
Wer rechtschreipfeler Vindet darv die auch gerne behallten :-)
malsdgtac
Beiträge: 717
Registriert: Fr 12. Mär 2004, 15:50
Kontaktdaten:

Beitrag von malsdgtac »

Hallo, kann mir bitte jemand sagen, wo dieser Codeschnippsel das zweite Mal vorkommt?

Für alle Fälle hier der ganze Coder der Datei include.con_str_oberview.php aus dem Ordner includes:

Code: Alles auswählen

<?php

/******************************************
* File      :   includes.con_str_overview.php
* Project   :   Contenido
* Descr     :   Displays the structure in
*               the left frame.
*
* Author    :   Jan Lengowski
* Created   :   26.01.2003
* Modified  :   24.04.2003
*
* © four for business AG
*****************************************/

if ( !is_object($db2) ) $db2 = new DB_Contenido;

$sess->register("remakeCatTable");
$sess->register("CatTableClient");
$sess->register("CatTableLang");

if ($CatTableClient != $client)
{
	$remakeCatTable = true;
}

if ($CatTableLang != $lang)
{
	$remakeCatTable = true;
}

$CatTableClient = $client;
$CatTableLang = $lang;

$sql = "SELECT
			a.preid AS preid,
			a.postid AS postid,
			a.parentid AS parentid,
            c.idcat AS idcat,
            c.level AS level,
            b.name AS name,
            b.public AS public,
            b.visible AS online,
            d.idtpl AS idtpl
        FROM
            (".$cfg["tab"]["cat"]." AS a, 
            ".$cfg["tab"]["cat_lang"]." AS b, 
            ".$cfg["tab"]["cat_tree"]." AS c) 
        LEFT JOIN
            ".$cfg["tab"]["tpl_conf"]." AS d
            ON (d.idtplcfg = b.idtplcfg) 
        WHERE
            a.idclient  = '".$client."' AND
            b.idlang    = '".$lang."' AND
            c.idcat     = b.idcat AND
            b.idcat     = a.idcat
        ORDER BY
            c.idtree ASC";

$db->query($sql);

if (isset($online))
{
	$remakeCatTable = true;
}

if (isset($public))
{
	$remakeCatTable = true;
}

if (isset($idtpl))
{
	$remakeCatTable = true;
}

if (isset($force))
{
	$remakeCatTable = true;
}

function buildTree (&$rootItem, &$items)
{
	global $nextItem, $perm;
	
	while ($item_list = each($items))
	{
		
		list($key, $item) = $item_list;
		
		unset($newItem);
		$newItem = new TreeItem($item['name'], $item['idcat'],true);
	
		$newItem->custom['visible'] = $item['visible'];
		$newItem->custom['online'] = $item['visible'];
		$newItem->custom['idtpl'] = $item['idtpl'];
		$newItem->custom['public'] = $item['public'];
		$newItem->custom['level'] = $item['level'];
		$newItem->custom['parentid'] = $item['parentid'];
		$newItem->custom['public'] = $item['public'];
		$newItem->custom['preid'] = $item['preid'];
		$newItem->custom['postid'] = $item['postid'];
		
		if ($perm->have_perm_item("con", $item['idcat']))
		{
			$newItem->custom['forcedisplay'] = 1;
		}
				
		$nextItem = $items[$key+1];
		$lastItem = $items[$key-1];
		
		
		$rootItem->addItem($newItem);
	

		if ($nextItem['level'] > $item['level'])
		{
			$oldRoot = $rootItem;
			buildTree($newItem, $items);
			
			$rootItem = $oldRoot;
		}
		
		if ($nextItem['level'] < $item['level'])
		{
			return;
		}
		
	}
	
}	

$items = array();
while ($db->next_record())
{
	$entry = array();
	
	$entry['idcat'] = $db->f("idcat");
	$entry['level'] = $db->f("level");
	$entry['name'] = $db->f("name");
	$entry['public'] = $db->f("public");
	$entry['online'] = $db->f("online");
	$entry['idtpl'] = $db->f("idtpl");
	$entry['visible'] = $db->f("online");
	$entry['preid'] = $db->f("preid");
	$entry['postid'] = $db->f("postid");
	$entry['parentid'] = $db->f("parentid");
	
	array_push($items, $entry);
}


if (!is_string($serializedRootCatItem))
{
	$rootCatItem = new TreeItem("root",-1);
	buildTree($rootCatItem, $items);
	
} else {
	$rootCatItem = unserialize($serializedRootCatItem);
	
	if ($remakeCatTable == true)
		{
			$list = array();
			$rootCatItem->getExpandedList($list);
			
			unset($rootStrItem);
			$rootCatItem = new TreeItem("root",-1);
			buildTree($rootCatItem,$items);
			
			foreach ($list as $key=>$value)
			{
				$rootCatItem->markExpanded($value);
			}
			
			$remakeCatTable = false;
		}
}
	
if (is_numeric($collapse))
{
	$rootCatItem->markCollapsed($collapse);
}

if (is_numeric($expand))
{
	$rootCatItem->markExpanded($expand);
}	

if ($expand == "all")
{
	$rootCatItem->expandAll(-1);
}

if ($collapse == "all")
{
	$rootCatItem->collapseAll(-1);
}


$objects = array();

$rootCatItem->traverse($objects);

$tpl->reset();

//if ( $perm->have_perm_item(6, 0) ) {

    # create javascript multilink
    $tmp_mstr = '<a href="javascript://" onclick="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';

    $mstr = sprintf($tmp_mstr, 'right_bottom',
                               $sess->url("main.php?area=$area&frame=4&idcat=0"),
                               'right_top',
                               $sess->url("main.php?area=$area&frame=3&idcat=0"),
                               'Lost and Found');

    $img_folder = '<img src="images/folder_on_error.gif">';

    $tpl->set('d', 'IMAGE',     $img_folder);
    $tpl->set('d', 'CFGDATA',   $cfgdata);
    $tpl->set('d', 'BGCOLOR',   $bgcolor);
    $tpl->set('d', 'INDENT',    $indent);
    $tpl->set('d', 'CAT',       $mstr);
    $tpl->set('d', 'COLLAPSE', '&nbsp;');
    $tpl->next();

    $tpl->set('d', 'COLLAPSE', '');
    $tpl->set('d', 'IMAGE', '');
    $tpl->set('d', 'CAT', '&nbsp;');
    $tpl->next();

    $selflink = "main.php";
    $expandlink = $sess->url($selflink . "?area=$area&frame=$frame&expand=all");
    $collapselink = $sess->url($selflink . "?area=$area&frame=$frame&collapse=all");
    $collapseimg = '<a href="'.$collapselink.'" alt="'.i18n("Close all categories").'" title="'.i18n("Close all categories").'"><img src="images/but_minus.gif" border="0"></a>';
    $expandimg = '<a href="'.$expandlink.'" alt="'.i18n("Open all categories").'" title="'.i18n("Open all categories").'"><img src="images/but_plus.gif" border="0"></a>';
    $allLinks = $expandimg .'<img src="images/spacer.gif" width="3">'.$collapseimg;

    $tpl->set('d', 'IMAGE',     '');
    $tpl->set('d', 'CFGDATA',   '');
    $tpl->set('d', 'BGCOLOR',   '#ffffff');
    $tpl->set('d', 'INDENT',    0);
    $tpl->set('d', 'CAT',       '&nbsp;');
    $tpl->set('d', 'COLLAPSE', $allLinks);
    $tpl->next();

//}

unset($objects[0]);
foreach ($objects as $key=>$value) {

    if (
         $perm->have_perm_area_action("con", "con_makestart") ||
         $perm->have_perm_area_action("con", "con_makeonline") ||
         $perm->have_perm_area_action("con", "con_deleteart") ||
         $perm->have_perm_area_action("con", "con_tplcfg_edit") ||
         $perm->have_perm_area_action("con", "con_makecatonline") ||
         $perm->have_perm_area_action("con", "con_changetemplate") ||
         $perm->have_perm_area_action("con_editcontent", "con_editart") ||
         $perm->have_perm_area_action("con_editart", "con_edit") ||
         $perm->have_perm_area_action("con_editart", "con_newart") ||
         $perm->have_perm_area_action("con_editart", "con_saveart") ||
         $perm->have_perm_area_action_item("con", "con_makestart",$value->id) ||
         $perm->have_perm_area_action_item("con", "con_makeonline",$value->id) ||
         $perm->have_perm_area_action_item("con", "con_deleteart",$value->id) ||
         $perm->have_perm_area_action_item("con", "con_tplcfg_edit",$value->id) ||
         $perm->have_perm_area_action_item("con", "con_makecatonline",$value->id) ||
         $perm->have_perm_area_action_item("con", "con_changetemplate",$value->id) ||
         $perm->have_perm_area_action_item("con_editcontent", "con_editart",$value->id) ||
         $perm->have_perm_area_action_item("con_editart", "con_edit",$value->id) ||
         $perm->have_perm_area_action_item("con_editart", "con_newart",$value->id) ||
         $perm->have_perm_area_action_item("con_editart", "con_saveart",$value->id) ||
         $value->isCustomAttributeSet("forcedisplay")) {

		if ($value->custom['parentid'] == 0)
		{			
            #$tpl->set('d', 'COLLAPSE', '');
			#$tpl->set('d', 'IMAGE', '');
			#$tpl->set('d', 'CAT', '&nbsp;');
			#$tpl->next();
		}
		
        $idcat = $value->id;
        $level = $value->level - 1;
        $name = $value->name;

        # Indent for every level
        $cnt = $value->level - 1;
        $indent = 0;

		$tpl->set('d', 'COLLAPSE', $value->getExpandCollapseButton());
        for ($i = 0; $i < $cnt; $i ++) {
            # 15 px for every level
            $indent += 12;
        }

        # create javascript multilink
        $tmp_mstr = '<a href="javascript://" onclick="javascript:conMultiLink(\'%s\', \'%s\', \'%s\', \'%s\')">%s</a>';

        $mstr = sprintf($tmp_mstr, 'right_top',
                                   $sess->url("main.php?area=$area&frame=3&idcat=$idcat&idtpl=$idtpl"),
                                   'right_bottom',
                                   $sess->url("main.php?area=$area&frame=4&idcat=$idcat&idtpl=$idtpl"),
                                   $name);

        $bgcolor = ( is_int($tpl->dyn_cnt / 2) ) ? $cfg["color"]["table_light"] : $cfg["color"]["table_dark"];

        # Create cfgdata string
        $idtpl = ( $value->custom['idtpl'] != '' ) ? $value->custom['idtpl'] : 0;

        if ($perm->have_perm_area_action_item("con", "con_changetemplate",$value->id) ||
        	$perm->have_perm_area_action("con", "con_changetemplate")) {
      		
            $changetemplate = 1;
            
      	} else {
      		$changetemplate = 0;
      		
      	}
      	
      	
      	if ($perm->have_perm_area_action_item("con", "con_makecatonline",$value->id) ||
        		    $perm->have_perm_area_action("con", "con_makecatonline"))
       	{
       		$onoffline = 1;
       	} else {
       		$onoffline = 0;
       	}
       	
       	if ($perm->have_perm_area_action_item("con", "con_makepublic",$value->id) ||
        		    $perm->have_perm_area_action("con", "con_makepublic"))
		{
			$makepublic = 1;
		} else {
			$makepublic = 0;
		}
       	
       	/* Build cfgdata string */
        $cfgdata = $idcat."-".$idtpl."-".$value->custom['online']."-".$value->custom['public']."-".
        		   $changetemplate ."-".
        	       $onoffline ."-".
        	       $makepublic;       	

        # Select the appropriate folder-
        # image depending on the structure
        # properties
        $sql2 = "SELECT
                    c.is_start AS is_start,
                    a.online AS online
                FROM
                    (".$cfg["tab"]["art_lang"]." AS a,
                    ".$cfg["tab"]["art"]." AS b,
                    ".$cfg["tab"]["cat_art"]." AS c )
                WHERE
                    a.idlang = ".$lang." AND
                    a.idart = b.idart AND
                    b.idclient = '".$client."' AND
                    b.idart = c.idart AND
                    c.idcat = '".$idcat."'";

        $db2->query($sql2);

        $no_start   = true;
        $no_online  = true;

        while ( $db2->next_record() ) {

            if ( $db2->f("is_start") == 1 ) {
                $no_start = false;
            }

            if ( $db2->f("online") == 1 ) {
                $no_online = false;
            }
        }

        if ( $value->custom['online'] == 1 ) {
            # Category is online

            if ( $value->custom['public'] == 0 ) {
                # Category is locked
                if ( $no_start || $no_online ) {
                    # Error found
                    $tmp_img = "folder_on_error_locked.gif";

                } else {
                    # No error found
                    $tmp_img = "folder_on_locked.gif";

                }

            } else {
                # Category is public
                if ( $no_start || $no_online ) {
                    # Error found
                    $tmp_img = "folder_on_error.gif";

                } else {
                    # No error found
                    $tmp_img = "folder_on.gif";

                }
            }

        } else {
            # Category is offline

            if ( $value->custom['public'] == 0 ) {
                # Category is locked
                if ( $no_start || $no_online ) {
                    # Error found
                    $tmp_img = "folder_off_error_locked.gif";

                } else {
                    # No error found
                    $tmp_img = "folder_off_locked.gif";

                }

            } else {
                # Category is public
                if ( $no_start || $no_online ) {
                    # Error found
                    $tmp_img = "folder_off_error.gif";

                } else {
                    # No error found
                    $tmp_img = "folder_off.gif";

                }
            }
        }

        $img_folder = sprintf('<img src="images/%s" width="15" height="13" alt="">', $tmp_img);

        $tpl->set('d', 'IMAGE',     $img_folder);
        $tpl->set('d', 'CFGDATA',   $cfgdata);
        $tpl->set('d', 'BGCOLOR',   $bgcolor);
        $tpl->set('d', 'INDENT',    $indent);
        $tpl->set('d', 'CAT',       $mstr);
        $tpl->next();

    } // end if have_perm

} // end while

$tpl->generate($cfg['path']['templates'] . $cfg['templates']['con_str_overview']);

$sess->register("serializedRootCatItem");
$serializedRootCatItem = serialize($rootCatItem);

?>

Vielen Dank für Eure Hilfe.

Nur zur Info: Ich habe auch die 4.4.4 laufen, und seit dem Upgrade des Servers auf MySQL5 und PHP5 wird unter "Artikel" kein Navigationspfad angezeigt.
HerrB
Beiträge: 6935
Registriert: Do 22. Mai 2003, 12:44
Wohnort: Berlin
Kontaktdaten:

Beitrag von HerrB »

Schon mal an auf V4.4.6 aktualisieren gedacht? Bin mir nicht ganz sicher, aber ich bin der Meinung, dass es da - zumindest teilweise - gefixt ist.

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
malsdgtac
Beiträge: 717
Registriert: Fr 12. Mär 2004, 15:50
Kontaktdaten:

Beitrag von malsdgtac »

Hallo Herr B,

das war ohendies mein erster Gedanke, das geht aber deswegen nicht, weil es in der 4.6 keine Mehrfachzuordnung der Artikel gibt, worauf ich bei diesem Projekt nicht verzichten kann, da die Artikel alle zwischen 3 und 10 mal zugedordnet sind.

Leider muss ich daher die 4.4 ins laufen bekommen.

Die 4.6.8 und 4.6.15 funktionieren übrigens bei dieser Serverkonfiguration einwandfrei.
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

4.4.6 != 4.6.x
*** make your own tools (wishlist :: thx)
malsdgtac
Beiträge: 717
Registriert: Fr 12. Mär 2004, 15:50
Kontaktdaten:

Beitrag von malsdgtac »

ich habs gefunden, die Änderung muss in den Dateien "icnlude.con_art_overview.php" und include.con_str_overview.php" gemacht werden.
speedmaster
Beiträge: 59
Registriert: Mi 18. Apr 2007, 18:43
Kontaktdaten:

Beitrag von speedmaster »

Hallo, kann mir bitte jemand sagen was genau in der include.con_art_overview.php geändert werden muss? Bin leider noch nicht so fit. Danke
HerrB
Beiträge: 6935
Registriert: Do 22. Mai 2003, 12:44
Wohnort: Berlin
Kontaktdaten:

Beitrag von HerrB »

Die Klammern bei

Code: Alles auswählen

FROM 
                    (".$cfg["tab"]["art_lang"]." AS a, 
                    ".$cfg["tab"]["art"]." AS b, 
                    ".$cfg["tab"]["cat_art"]." AS c ) 
Ob das in beiden Dateien so aussieht, weiß ich gerade nicht - siehe oben. Ansonsten ist die V4.6.15 auch sehr hübsch...

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
Gesperrt