Fatal error: Call to a member function reset()

pixelwerk
Beiträge: 37
Registriert: Di 22. Apr 2008, 18:03
Kontaktdaten:

Fatal error: Call to a member function reset()

Beitrag von pixelwerk » Di 22. Apr 2008, 18:08

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

xmurrix
Beiträge: 3143
Registriert: Do 21. Okt 2004, 11:08
Wohnort: Augsburg
Kontaktdaten:

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

Beitrag von xmurrix » Di 22. Apr 2008, 18:37

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

pixelwerk
Beiträge: 37
Registriert: Di 22. Apr 2008, 18:03
Kontaktdaten:

Beitrag von pixelwerk » Di 22. Apr 2008, 20:33

Danke hatte folgendes vergessen!

Code: Alles auswählen

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

topfind
Beiträge: 2
Registriert: Mi 23. Apr 2008, 15:25
Kontaktdaten:

Beitrag von topfind » Mi 23. Apr 2008, 15:29

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

timo.trautmann_4fb
Beiträge: 472
Registriert: Di 15. Apr 2008, 15:57
Wohnort: Michelstadt
Kontaktdaten:

Beitrag von timo.trautmann_4fb » Mi 23. Apr 2008, 15:41

Which version of contenido do you use? 4.8.1 or 4.8.2?

topfind
Beiträge: 2
Registriert: Mi 23. Apr 2008, 15:25
Kontaktdaten:

Beitrag von topfind » Do 24. Apr 2008, 09:57

4.8.2.

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

xmurrix
Beiträge: 3143
Registriert: Do 21. Okt 2004, 11:08
Wohnort: Augsburg
Kontaktdaten:

Beitrag von xmurrix » Do 24. Apr 2008, 13:05

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

timo.trautmann_4fb
Beiträge: 472
Registriert: Di 15. Apr 2008, 15:57
Wohnort: Michelstadt
Kontaktdaten:

Beitrag von timo.trautmann_4fb » Do 24. Apr 2008, 15:34

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();
}

tommai
Beiträge: 4
Registriert: Mi 7. Mai 2008, 13:41
Kontaktdaten:

Beitrag von tommai » Mi 7. Mai 2008, 17:02

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]
Zuletzt geändert von tommai am Mi 7. Mai 2008, 17:05, insgesamt 1-mal geändert.

timo.trautmann_4fb
Beiträge: 472
Registriert: Di 15. Apr 2008, 15:57
Wohnort: Michelstadt
Kontaktdaten:

Beitrag von timo.trautmann_4fb » Mi 7. Mai 2008, 17:04

Welche Contenido Version benutzt du? In der aktuellen Version 4.8.3 sollte das Problem eigentlich nicht mehr bestehen.

tommai
Beiträge: 4
Registriert: Mi 7. Mai 2008, 13:41
Kontaktdaten:

Beitrag von tommai » Mi 7. Mai 2008, 17:05

4.8.2

timo.trautmann_4fb
Beiträge: 472
Registriert: Di 15. Apr 2008, 15:57
Wohnort: Michelstadt
Kontaktdaten:

Beitrag von timo.trautmann_4fb » Mi 7. Mai 2008, 17:07

Dann bitte einfach auf die aktuelle Version updaten. Sollte es dort auch zu diesem Fehler kommen bitte einfach noch einmal melden.

tommai
Beiträge: 4
Registriert: Mi 7. Mai 2008, 13:41
Kontaktdaten:

Beitrag von tommai » Mi 7. Mai 2008, 17:20

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...

Dodger77
Beiträge: 3626
Registriert: Di 12. Okt 2004, 20:00
Wohnort: Voerde (Niederrhein)
Kontaktdaten:

Beitrag von Dodger77 » Mi 7. Mai 2008, 20:56

timo.trautmann_4fb hat geschrieben:Dann bitte einfach auf die aktuelle Version updaten.
Beim Update werden aber doch nicht bestehende Module überschrieben.

risibility
Beiträge: 89
Registriert: Fr 25. Feb 2005, 00:13
Wohnort: Darmstadt
Kontaktdaten:

Beitrag von risibility » Sa 10. Mai 2008, 18:47

Hier die Module

Grüße
Ris
Contenido Version: 4.8.3
Apache 1.3.34
MySQL Serverversion 5.0.32
Installierte PHP-Version 5.2.5

Gesperrt