• Welcome to WebsiteBaker Community Forum. Please log in or sign up.
Welcome, Guest
News
Support WebsiteBaker
Your donations will help to:
PayPal
  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!
You can donate by clicking on the button below.

Polls

Started by dbs, June 11, 2023, 06:11:57 PM  ( Read 19,720 times )

dbs

Hi, is there a working Polls module somewhere?
Version 1.2. with WB r185 and PHP 8.0 shows me in backend:
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?

    Gast

    if we talk from the same version, the filename-format inside of the cmd-folder is not longer allowed in the newer SimpleCommandDispatcher.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

      dbs

      Thank you, this helps in first tests  (Y)
      +
      use vendor\phplib\Template;
      in View & Modify.

        Gast


        dbs

        Hm, works on a test site. My created install zip of the module is not installable on the target site (r166, PHP 8.0).
        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.

          Gast

          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


            dbs

            This version works like expected.  (Y)
            Thank you again.

              \n\n