Jump to content
thirty bees forum

Question

Posted

Hi All

Thank you ThirtyBees for the best Ecommerce package, and with excitement, I tried the update and got this error below, could anyone please help me:

 

I paste it below and attached it:

 

ThirtyBeesDatabaseException

Unknown column 'id_feature_product' in 'IN/ALL/ANY subquery'

in file /home/torchsac/public_html/olightsa.co.za/modules/ultimatedatabaseoptimizer/classes/Database.php at line 1581

SQL

SELECT COUNT(*) FROM `ps_feature_product_lang` WHERE `id_feature_product` NOT IN (SELECT `id_feature_product` FROM `ps_feature_product`) LIMIT 1

Source file: /home/torchsac/public_html/olightsa.co.za/modules/ultimatedatabaseoptimizer/classes/Database.php

1562:                $this->errorIntegrity[] = $this->dBPrefix . $query_array[0];
1563:            }
1564:            $psTables[] = $this->dBPrefix . $query_array[0]; // Save Prestashop original tables with no _lang and no _shop in array.
1565:        }
1566:        foreach ($psTables as $originalTable) {
1567:            foreach ($this->dBTables as $table) {
1568:                if ( Tools::substr($table['name'], -5) == '_lang' && $originalTable ==  Tools::substr($table['name'], 0, -5)) {
1569:                    $psOriginalLangTables[] = $table['name']; // Save Prestashop original tables with _lang
1570:                } elseif ( Tools::substr($table['name'], -5) == '_shop' && $originalTable ==  Tools::substr($table['name'], 0, -5)) {
1571:                    $psOriginalShopTables[] = $table['name']; // Save Prestashop original tables with _shop
1572:                }
1573:            }
1574:        }
1575:        // Check _lang tables
1576:        foreach ($psOriginalLangTables as $table) {
1577:            $table_lang         = $table;
1578:            $table              = str_replace('_lang', '', $table_lang);
1579:            $id_table           = 'id_' . preg_replace('/^' . $this->dBPrefix . '/', '', $table);
1580:            $sql                = 'SELECT COUNT(*) FROM `' . pSQL($table_lang) . '` WHERE `' . pSQL($id_table) . '` NOT IN (SELECT `' . pSQL($id_table) . '` FROM `' . pSQL($table) . '`);';
1581:            $totalIntegrityRows = (int) Db::getInstance()->getValue($sql);
1582:            if ($totalIntegrityRows > 0) {
1583:                $this->errorIntegrity[] = $table_lang;
1584:            }
1585:            $sql                = 'SELECT COUNT(*) FROM `' . pSQL($table_lang) . '` WHERE `id_lang` NOT IN (SELECT `id_lang` FROM `' . pSQL($this->dBPrefix) . 'lang`);';
1586:            $totalIntegrityRows = (int) Db::getInstance()->getValue($sql);
1587:            if ($totalIntegrityRows > 0) {
1588:                $this->errorIntegrity[] = $table_lang;
1589:            }
1590:        }
1591:        // Check _shop tables

Stack trace

1. classes/db/Db.php:867  source () 
2. classes/db/Db.php:502  source DbCore->displayError() 
3. classes/db/Db.php:789  source DbCore->query() 
4. classes/db/Db.php:816  source DbCore->getRow() 
5. modules/ultimatedatabaseoptimizer/classes/Database.php:1581  source DbCore->getValue() 
6. modules/ultimatedatabaseoptimizer/classes/Database.php:110  source Database->checkIntegrity() 
7. modules/ultimatedatabaseoptimizer/ultimatedatabaseoptimizer.php:787  source Database->__construct() 
8. classes/Hook.php:769  source UltimateDatabaseOptimizer->hookDisplayBackOfficeTop() 
9. classes/Hook.php:471  source HookCore::coreCallHook() 
10. classes/Hook.php:288  source HookCore::execWithoutCache() 
11. modules/ets_superspeed/classes/ext/ets_hook:59  source HookCore::exec() 
12. override/classes/Hook.php:41  source Ets_Hook::exec16() 
13. classes/controller/AdminController.php:3939  source Hook::exec() 
14. classes/controller/Controller.php:198  source AdminControllerCore->init() 
15. classes/Dispatcher.php:861  source ControllerCore->run() 
16. override/classes/Dispatcher.php:39  source DispatcherCore->dispatch() 
17. admin429zfhthp/index.php:58  source Dispatcher->dispatch()

 

PHP version: 8.0.25.  Code revision: 1.4.0 build for PHP 7.4

Screenshot 2022-11-14 at 16.38.58.png

6 answers to this question

Recommended Posts

  • 0
Posted

This is bug in ultimatedatabaseoptimizer module -- module constructs invalid sql query, and database raises error.

New version of tb reports all invalid sql queries as errors. Previous tb versions silently ignored these errors.

You can force the original behaviour (see Advanced Parameters > Performance > Ignore SQL errors), but I strongly advice against it.

You should contact module developer and ask them to fix the bug instead.

  • 0
Posted
On 11/15/2022 at 9:44 AM, datakick said:

Most likely.

Thank you, this helped. I am so happy, thank you.

 

If I would like to run the website on PHP 8.1, is this recommended?  Or would the current modules and theme crash?

  • 0
Posted
1 hour ago, HenriBierman said:

Thank you, this helped. I am so happy, thank you.

 

If I would like to run the website on PHP 8.1, is this recommended?  Or would the current modules and theme crash?

I'm running my store on php8.1 already, works very smoothly.

While thirty bees core and most native modules are php8.1 compatible, third party modules might not be. The only way to test this is by trying. 

 

  • 0
Posted

@datakick - speaking of 8.1 compatibility - do you offer site audit for installed theme/modules? I have few bugs here and there, few notifications and warnings that I want to iron out. Not many third party modules. Theme - Warehouse.

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