Seite 1 von 3

Fatal error: Call to a member function reset()

Verfasst: Di 22. Apr 2008, 18:08
von pixelwerk
Guten Abend,

ich hab folgendes, im Editor und auf der Seite kommt diese Fehlermeldung!
Ich kann kein Inhalt verwalten weis jemand woran das liegt?

Code: Alles auswählen

Fatal error: Call to a member function reset() on a non-object in /home/httpd/vhosts/testermann.de/httpdocs/contenido/includes/include.con_editcontent.php(619) : eval()'d code on line 222

Re: Fatal error: Call to a member function reset()

Verfasst: Di 22. Apr 2008, 18:37
von xmurrix
pixelwerk hat geschrieben:ich hab folgendes, im Editor und auf der Seite kommt diese Fehlermeldung!
Ich kann kein Inhalt verwalten weis jemand woran das liegt?

Code: Alles auswählen

Fatal error: Call to a member function reset() on a non-object in /home/httpd/vhosts/testermann.de/httpdocs/contenido/includes/include.con_editcontent.php(619) : eval()'d code on line 222
Die Infos sind etwas dürftig, kann es sein, dass dieser Fehler erst nach einer Änderung der Modulcodes aufgetaucht ist?

Falls ja, dann scheint es so zu sein, dass irgendwo in der Ausgabe eines Moduls sehr wahrscheinlich die reset() Methode der Template Klasse aufgerufen wird, ohne dass vorher eine Instanz davon erzeugt zu haben. Oder das Templateobjekt wird in einer Funktion verwendet, ohne dass vorher die Variable in den Geltungsbereich der Funktion (Stichwort global) übernommen wurde.

Überprüfe dochmal die zuletzt geänderten Modulausgaben auf die oben genannten Punkte hin.

Gruß
xmurrix

Verfasst: Di 22. Apr 2008, 20:33
von pixelwerk
Danke hatte folgendes vergessen!

Code: Alles auswählen

<container id="1" name="ContenidoHeader" types="Content" mode="fixed" default="Contenido_Header">ContenidoHeader</container>

Verfasst: Mi 23. Apr 2008, 15:29
von topfind
Same problem here:

in backend:

Code: Alles auswählen

Fatal error: Call to a member function reset() on a non-object in /home/httpd/docs/clients/cms.topfind.nl/contenido/includes/include.con_editcontent.php(619) : eval()'d code on line 198
in frontend:

Code: Alles auswählen

Fatal error: Call to a member function reset() on a non-object in /home/httpd/docs/clients/cms.topfind.nl/cms/front_content.php(917) : eval()'d code on line 42
this is a new installation:

PHP Version 5.2.1

Verfasst: Mi 23. Apr 2008, 15:41
von timo.trautmann_4fb
Which version of contenido do you use? 4.8.1 or 4.8.2?

Verfasst: Do 24. Apr 2008, 09:57
von topfind
4.8.2.

I first installed 4.8.1, this error appeard.
After that i installed 4.8.2, still the same error.

Verfasst: Do 24. Apr 2008, 13:05
von xmurrix
This error could occur after removing the Module inclution tag of module "Contenido_Header" from the standard template.

You need at least one created instance of the Template class in your first included module.

Module "Contenido_Header" creates this by using following snippet:

Code: Alles auswählen

if (!isset($tpl) || !is_object($tpl) || strtolower(get_class($tpl)) != 'template') {
    $tpl = new Template();
}
Following modules inside the template are using this object, also the reset() method of it. Therefore putting the snipped above in your first included module should do the trick.

xmurrix

Verfasst: Do 24. Apr 2008, 15:34
von timo.trautmann_4fb
Solution is to add following lines in each module which uses $tpl

Code: Alles auswählen

if (!is_object($tpl)) {
    $tpl = new Template();
}
Modules for next release will be checked.

Update checkin for next version
added in all modules where necessary

Code: Alles auswählen

if (!isset($tpl) || !is_object($tpl)) {
    $tpl = new Template();
}

Verfasst: Mi 7. Mai 2008, 17:02
von tommai
timo.trautmann_4fb hat geschrieben: Solution is to add following lines in each module which uses $tpl

Code: Alles auswählen

if (!is_object($tpl)) {
    $tpl = new Template();
}
Wo genau muss ich diesen Code in das Modul einfügen?
Style / Module / Picture-Gallery... und dann?

Danke für eine Antwort...
Ich bekommen nämlich folgende Meldung:

Code: Alles auswählen

Fatal error: Call to a member function generate() on a non-object in /home/www/web364/html/vagalume/cms/front_content.php(917) : eval()'d code on line 556
PS: Ich habe noch nichts geändert an den Modulen, es sollte noch alles original nach der Neuinstallation sein.[/quote]

Verfasst: Mi 7. Mai 2008, 17:04
von timo.trautmann_4fb
Welche Contenido Version benutzt du? In der aktuellen Version 4.8.3 sollte das Problem eigentlich nicht mehr bestehen.

Verfasst: Mi 7. Mai 2008, 17:05
von tommai
4.8.2

Verfasst: Mi 7. Mai 2008, 17:07
von timo.trautmann_4fb
Dann bitte einfach auf die aktuelle Version updaten. Sollte es dort auch zu diesem Fehler kommen bitte einfach noch einmal melden.

Verfasst: Mi 7. Mai 2008, 17:20
von tommai
Danke.
Ich habe jedoch schon einige Tage am Template etc. gebastelt und anpassungen vorgenommen und habe jetzt Angst, dass alles gelöscht wird, wenn ich ein Upgrade mache...

Verfasst: Mi 7. Mai 2008, 20:56
von Dodger77
timo.trautmann_4fb hat geschrieben:Dann bitte einfach auf die aktuelle Version updaten.
Beim Update werden aber doch nicht bestehende Module überschrieben.

Verfasst: Sa 10. Mai 2008, 18:47
von risibility
Hier die Module

Grüße
Ris