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

OneForAll save_item.php problem with class.database.php

Started by CodeALot, February 07, 2024, 09:59:33 AM  ( Read 21,133 times )

CodeALot

WebsiteBaker-Version: 2.13.5 -r220 with patch 223
PHP version 8.2.15
OneForAll version 2.0.2.23


Module functions OK at the front-end. When you try to save a record in the backend, you get:

There was an uncatched exception
You have an error in your SQL syntax
; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `item_id` = 22' at line 1
in line
(828) of (/framework/class.database.php):


There is no statement 'WHERE 'item_id" at line 1. It's not at line 828 in class.database.php either.
Where do I look to fix this? :-)

WB's errorlog tells me this whenever I try to save a record:

Wed, 07 Feb 2024 09:01:49 +0000 [E_DEPRECATED] /modules/oneforall/save_item.php:[79] from /modules/oneforall/save_item.php:[79] strip_tags "strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated"
Wed, 07 Feb 2024 09:01:49 +0000 [E_DEPRECATED] /modules/oneforall/save_item.php:[80] from /modules/oneforall/save_item.php:[80] strip_tags "strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated"
Wed, 07 Feb 2024 09:01:49 +0000 [E_DEPRECATED] /modules/oneforall/save_item.php:[103] from /modules/oneforall/save_item.php:[103] strip_tags "strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated"
Wed, 07 Feb 2024 09:01:49 +0000 [E_DEPRECATED] /modules/oneforall/save_item.php:[104] from /modules/oneforall/save_item.php:[104] strip_tags "strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated"
Wed, 07 Feb 2024 09:01:49 +0000 [E_USER_DEPRECATED] /framework/class.wb.php:[562] from /modules/oneforall/save_item.php:[571] bin\wb->get_user_id "invalid method call: bin\wb::get_user_id change it to getUserId()"
Wed, 07 Feb 2024 09:01:49 +0000 [E_WARNING] /framework/class.wb.php:[563] from /modules/oneforall/save_item.php:[571] bin\wb->get_user_id "Undefined property: admin::$getUserId""


    dbs


    CodeALot

    Quote from: dbs on February 07, 2024, 01:49:41 PM
    Hi, you can try the save_item.php from here: https://forum.WebsiteBaker.org/index.php/topic,32247.0.html
    But not install the whole module!

    Thank you, but unfortunately that doesn't work because the database setup for that version of OFA is different. When I try save_item, I get:

    There was an uncatched exception
    Table
    'mydatabasename.wb_mod_oneforall_general_settings' doesn't exist
    in line (828) of (/framework/class.database.php):


    EDIT: I commented out lines 56 - 72 and then it works... ;-)

      dbs

      Therefore you should not install the module. It is a version with extras like general_settings instead of OFA config.php
      I'm glad it helped  :)

        CodeALot

        For now it does, the only thing is that it doesn't create an access page for the detail view of a new record, but that is solved by using the 'rebuild access pages' function in WB. So it's a workaround, and I hope there will be an updated new OFA that deals with the errors in the current 'official' version under WB 2.13.5 and PHP 8.2 and up...

        Thanks again!

          dbs

          "fun fact", if i deactivate detail pages it further create detail pages.

            CodeALot

            Quote from: dbs on February 07, 2024, 04:15:59 PM
            "fun fact", if i deactivate detail pages it further create detail pages.
            I'll try that! :-)

              \n\n