WebsiteBaker Community Forum

WebsiteBaker Support (2.13.x) => Modules => Topic started by: dbs on June 11, 2023, 06:11:57 PM

Title: Polls
Post by: dbs on June 11, 2023, 06:11:57 PM
Hi, is there a working Polls module somewhere?
Version 1.2. with WB r185 and PHP 8.0 shows me in backend:
Code: [Select]
There was an uncatched exception
 call of invalid command [Modify] for [modules/polls] failed!
 in line (231) of (/modules/SimpleCommandDispatcher.inc.php):

What can i do in this case?
Title: Re: Polls
Post by: sternchen8875 on June 12, 2023, 12:29:27 AM
if we talk from the same version, the filename-format inside of the cmd-folder is not longer allowed in the newer SimpleCommandDispat cher.php.
You can try to rename the files in the cmd-folder of this module from
cmdModify.inc to Modify.inc.php
cmdSave.inc to Save.inc.php
cmdUninstall.inc to Uninstall.inc.php
cmdUpgrade.inc to Upgrade.inc.php
cmdView.inc to View.inc.php

this will fix the error from your post, but maybe, it need a little bit more, but step by step

if you dont have the version with filenames like my list in the top inside of the cmd-folder, pls add a module-zip in the next answer
Title: Re: Polls
Post by: dbs on June 12, 2023, 07:02:05 AM
Thank you, this helps in first tests  (Y)
+
Code: [Select]
use vendor\phplib\Template;in View & Modify.
Title: Re: Polls
Post by: sternchen8875 on June 12, 2023, 11:15:04 AM
 (Y)
Title: Re: Polls
Post by: dbs on June 12, 2023, 04:26:18 PM
Hm, works on a test site. My created install zip of the module is not installable on the target site (r166, PHP 8.0).
Code: [Select]
There was an uncatched exception
 database::escapeString(): Argument #1 ($unescaped_string) must be of type string, bool given, called in /var/www/vhosts/johannes-rheine.de/httpdocs/framework/functions.php on line 1068
 in line (257) of (/framework/class.database.php):

Maybe you can have a look, module attached.
Title: Re: Polls
Post by: sternchen8875 on June 12, 2023, 05:00:01 PM
repaired version 1.2.2 in the attachement

add missing definitions for $module_platform and $module_licence in info.php, because the definitions in framework/functions.php / Ln 1048 ff does'nt work correctly

Title: Re: Polls
Post by: dbs on June 12, 2023, 07:37:24 PM
This version works like expected.  (Y)
Thank you again.