Skip to content

Table 'dbName.core_file_storage' doesn't exist #2614

Closed
@alexh-swdev

Description

@alexh-swdev

I am on OpenMage 20.0.16 and PHP8.0

In the Exception.log, I see the following entries:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbName.core_file_storage' doesn't exist in /var/www/vhosts/....../lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /var/www/vhosts/....../lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute()
#1 /var/www/vhosts/....../lib/Varien/Db/Statement/Pdo/Mysql.php(103): Zend_Db_Statement_Pdo->_execute()
#2 /var/www/vhosts/....../app/code/core/Zend/Db/Statement.php(290): Varien_Db_Statement_Pdo_Mysql->_execute()
#3 /var/www/vhosts/....../lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute()
#4 /var/www/vhosts/....../lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query()
#5 /var/www/vhosts/....../lib/Varien/Db/Adapter/Pdo/Mysql.php(501): Zend_Db_Adapter_Pdo_Abstract->query()
#6 /var/www/vhosts/....../lib/Zend/Db/Adapter/Abstract.php(756): Varien_Db_Adapter_Pdo_Mysql->query()
#7 /var/www/vhosts/....../app/code/core/Mage/Core/Model/Resource/File/Storage/Database.php(144): Zend_Db_Adapter_Abstract->fetchRow()
#8 /var/www/vhosts/....../app/code/core/Mage/Core/Model/File/Storage/Database.php(118): Mage_Core_Model_Resource_File_Storage_Database->loadByFilename()
#9 /var/www/vhosts/....../get.php(148): Mage_Core_Model_File_Storage_Database->loadByFilename()
#10 {main}

Next Zend_Db_Statement_Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbName.core_file_storage' doesn't exist, query was: SELECT e.* FROM core_file_storage AS e WHERE (filename = 'filaname.jpg') AND (directory = 'catalog/product/cache/3/thumbnail/77x100/9df78eab33525d08d6e5fb8d27136e95/m/i') in /var/www/vhosts/....../lib/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /var/www/vhosts/....../lib/Varien/Db/Statement/Pdo/Mysql.php(103): Zend_Db_Statement_Pdo->_execute()
#1 /var/www/vhosts/....../app/code/core/Zend/Db/Statement.php(290): Varien_Db_Statement_Pdo_Mysql->_execute()
#2 /var/www/vhosts/....../lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute()
#3 /var/www/vhosts/....../lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query()
#4 /var/www/vhosts/....../lib/Varien/Db/Adapter/Pdo/Mysql.php(501): Zend_Db_Adapter_Pdo_Abstract->query()
#5 /var/www/vhosts/....../lib/Zend/Db/Adapter/Abstract.php(756): Varien_Db_Adapter_Pdo_Mysql->query()
#6 /var/www/vhosts/....../app/code/core/Mage/Core/Model/Resource/File/Storage/Database.php(144): Zend_Db_Adapter_Abstract->fetchRow()
#7 /var/www/vhosts/....../app/code/core/Mage/Core/Model/File/Storage/Database.php(118): Mage_Core_Model_Resource_File_Storage_Database->loadByFilename()
#8 /var/www/vhosts/....../get.php(148): Mage_Core_Model_File_Storage_Database->loadByFilename()
#9 {main}

The requested images to not exist (as far as I checked - probably someone should do a cleanup there) - The table does not exist.

I don't really get, what the corresponding code really does? ( Starting here:

$localStorage = Mage::getModel('core/file_storage_file');
)
Can I savely ignore these Exceptions? Is something really broken? Is this code a left-over from some cleanup?

/Edit: Media is saved on the file system, not in the database.
/Edit 2: So, the same file on a 20.0.14 installation ignores this exception per comment and also does not have this table.
-> So... These questions remain:

  • Can I ignore this error? -> Probably, because an older version of OM does so, too
  • What should this code archive? -> ???
  • Should this table normally exist? -> ???

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions