Jump to content
thirty bees forum
  • 0

Attempt to update unsaved object , TB 1.6


Question

Posted

Hello,

After the shop migration is done, I am still figuring out some minore issues. One is the following kind of error log entries:

[15-Mar-2025 17:57:19 Europe/Zurich] PHP Warning:  Attempt to update unsaved object in /home/codium/public_html/maxmalt.ch/shop/classes/ObjectModel.php on line 752
[19-Mar-2025 13:38:16 Europe/Zurich] PHP Warning:  Attempt to update unsaved object in /home/codium/public_html/maxmalt.ch/shop/classes/ObjectModel.php on line 752

When I search the server logfiles, this kind of HTTP request machtes with the timesamps.

[15/Mar/2025:17:57:19 +0100] "POST /?rand=1742057839489 HTTP/1.1" 200 171 "https://maxmalt.ch/glen-scotia-1992-23y-hart-brothers-finest-collection-50-5-scotia-1992-hb-283.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Mobile/15E148 Safari/604.1"
2a02:26f7:e344:5444:0:72b0:2cff:6faf - - [15/Mar/2025:17:57:19 +0100] "POST /index.php?controller=trigger&ts=1742016985 HTTP/1.1" 200 43 "https://maxmalt.ch/glen-scotia-1992-23y-hart-brothers-finest-collection-50-5-scotia-1992-hb-283.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Mobile/15E148 Safari/604.1"

[19/Mar/2025:13:38:16 +0100] "POST /index.php?controller=trigger&ts=1742387892 HTTP/2" 200 43 "https://maxmalt.ch/glen-scotia-1992-23y-hart-brothers-finest-collection-50-5-scotia-1992-hb-283.html" "Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Mobile/15E148 Safari/604.1"

2 answers to this question

Recommended Posts

  • 0
Posted

The corresponding code comes from ObjectModel:

    /**
     * Updates the current object in the database
     *
     * @param bool $nullValues
     *
     * @return bool
     * @throws PrestaShopDatabaseException
     * @throws PrestaShopException
     */
    public function update($nullValues = false)
    {
        $id = (int)$this->id;

        if (!$id) {
            trigger_error("Attempt to update unsaved object", E_USER_WARNING);
            return false;
        }

 

  • 0
Posted

Stacktrace

#0  builtin
#1  classes/ObjectModel.php(752): trigger_error("Attempt to update unsaved object", 512)
#2  classes/Cart.php(2809): ObjectModelCore->update(false)
#3  classes/controller/FrontController.php(1437): CartCore->update()
#4  override/controllers/front/CartController.php(86): FrontControllerCore->init()
#5  classes/controller/Controller.php(192): CartControllerCore->init()
#6  classes/controller/FrontController.php(264): ControllerCore->run()
#7  classes/Dispatcher.php(858): FrontControllerCore->run()
#8  index.php(70): DispatcherCore->dispatch()

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...