Dag Bakkers, het gastenboek op https://www.pierewaaienscheveningen.nl geeft een foutmelding als er wordt geprobeerd een bijdrage te schrijven:
QuoteThere was an uncatched exception
Call to private database::__construct() from invalid context
in line (43) of (/modules/guestbook/gstbk_add.php):
De module is Guestbook 2.8.5 in WB 2.12.0.
Ik heb geprobeerd een nieuwere versie van het gastenboek te vinden voor een evt. nodige update maar bij de add-on's kan ik het gastenboek helemaal niet meer vinden!
De websitepagina: https://www.pierewaaienscheveningen.nl/pages/gastenboek.php
do you use the "ban" module? (take a look into the modules-Folder to a module with the name = ban)
Quote from: HK on May 01, 2019, 09:14:33 AM
QuoteThere was an uncatched exception
Call to private database::__construct() from invalid context
in line (43) of (/modules/guestbook/gstbk_add.php):
De module is Guestbook 2.8.5 in WB 2.12.0.
This error message only occurs when attempting to create a new object instance of class 'database'.
For example, using: $database = new database();
I suspect that you have updated your WB from a very old version to 2.12 and therefore your guestbook version 2.8.5 is no longer compatible here.
You can probably solve the problem by updating your guestbook to version 2.8.7.2 modified by jacobi22.
A possible download may be here: Re: Probleme mit dem Guestbook 2.8.7 (https://forum.websitebaker.org/index.php/topic,30074.msg209860.html#msg209860)
the script in my old guestbook-modules show me in this place (gstbk_add.php - Line 43) the include of the ban-module (if avaiable), but i dont have the exact version 2.8.5 here. i've never seen this ban-module, but if you use it in this installation, it is also possible, that the error comes from this module (and not only from the guestbook)
search for this lines in gstbk_add.php (~line 42) and add a double slash (//) in the front of every line, if you work with this module and if you get more errors after the upgrade
if (file_exists(WB_PATH.'/modules/ban/banblock.php')){
include WB_PATH.'/modules/ban/banblock.php';
}
Version 2.8.8 runs without any bugs with php7.3 and WB 2.12.2
See link
https://forum.WebsiteBaker.org/index.php/topic,30074.msg210988.html#msg210988
To try in the test environment:
https://install.umojasingers.de/pages/gaestebuch.php
Ik heb een update gedaan met het gastenboek 2.8.8 en daarvoor de link gebruikt die hgs heeft gegeven. Het was niet nodig de oude versie te verwijderen; de update heeft de oude versie overschreven. Nieuwe berichten kunnen nu weer toegevoegd worden; de foutmelding is verdwenen. De oude berichten zijn nog gewoon aanwezig. Geweldig, 'it worked like a charm'. Nog een paar puntjes:
- Ik zou de tekst "Teken het gastenboek" willen vervangen door een andere tekst; waar kan ik dat doen?
- De module van het Gastenboek zou gevonden moeten kunnen worden bij de Add-ons maar dat is niet het geval.
- De Ad-ons zijn alleen te vinden in het menu van het Forum; zou die lijst ook niet een plekje verdienen in het menu van het Help project?
Gevonden! De tekst heb ik kunnen aanpassen in het NL taalbestand van de Guestbook Module. Logisch natuurlijk. De andere twee puntjes blijven nog wel even staan natuurlijk!