4

I currently have a error in my 1.9.3.2 store.

When a customer wants to reset their password, the Magento Report error page is displayed.

When check the report, I get the following error:

a:5:{i:0;s:156:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'customer_flowpassword' doesn't exist, query was: DESCRIBE `customer_flowpassword`";i:1;s:2832:"#0 /lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)

Problem is related to the update to 1.9.3.2, where the table was not created.

Should this solve the issue?

CREATE TABLE `customer_flowpassword` (
  `flowpassword_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Flow password Id',
  `ip` varchar(50) NOT NULL COMMENT 'User IP',
  `email` varchar(255) NOT NULL COMMENT 'Requested email for change',
  `requested_date` varchar(255) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Requested date for change',
  PRIMARY KEY (`flowpassword_id`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_EMAIL` (`email`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_IP` (`ip`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_REQUESTED_DATE` (`requested_date`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Customer flow password' AUTO_INCREMENT=9 ;

How can I solve that?

5
  • The table customer_flowpassword is not available, check which module is using the table and try to run the setup script for that module
    – John
    Apr 4, 2017 at 10:31
  • Looks like it is a problem with 1.9.3. That should create that table. See my update. Do you know how to run this?
    – JGeer
    Apr 4, 2017 at 13:08
  • Please add your config file code for the same module and name of your SQL file which has table creation code
    – John
    Apr 4, 2017 at 13:11
  • @John What exactly do you mean? By updating from 1.9.3.1 to 1.9.3.2 this table should be created by Magento, but that did not happen. So how can I solve this?
    – JGeer
    Apr 4, 2017 at 13:13
  • If you can add your config.xml file and your setup script name, I will guide you
    – John
    Apr 4, 2017 at 13:23

2 Answers 2

8

Solution 1

Go to database table core_resource, Find an entry for your module- could be customer_flowpassword_setup - and delete it.
Now refresh any page on your magento setup. It should re-run your setup script and will create table. Don't forget to refresh your cache.

Solution 2

Directly run below SQL in your database.

CREATE TABLE `customer_flowpassword` (
  `flowpassword_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Flow password Id',
  `ip` varchar(50) NOT NULL COMMENT 'User IP',
  `email` varchar(255) NOT NULL COMMENT 'Requested email for change',
  `requested_date` varchar(255) NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Requested date for change',
  PRIMARY KEY (`flowpassword_id`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_EMAIL` (`email`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_IP` (`ip`),
  KEY `IDX_CUSTOMER_FLOWPASSWORD_REQUESTED_DATE` (`requested_date`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Customer flow password' AUTO_INCREMENT=9 ;
0
8

This is a bug in Magento core, not recognizing your "table prefix" (confimed here)

See: /app/code/core/Mage/Customer/Model/Observer.php

Original code doesn't check for prefix ...

public function deleteCustomerFlowPassword()
{
    $connection = Mage::getSingleton('core/resource')->getConnection('write');
    $condition  = array('requested_date < ?' => Mage::getModel('core/date')->date(null, '-1 day'));
    $connection->delete($connection->getTableName('customer_flowpassword'), $condition);
}

It should look like ...

public function deleteCustomerFlowPassword()
{
    $resource   = Mage::getSingleton('core/resource');
    $connection = $resource->getConnection('write');
    $condition  = array('requested_date < ?' => Mage::getModel('core/date')->date(null, '-1 day'));
    $connection->delete($resource->getTableName('customer_flowpassword'), $condition);
}
3
  • 3
    I get really narky at Magento extension developers when they make that mistake, but in the core? Muppets!
    – iphigenie
    Jul 1, 2017 at 9:33
  • Is this already fixed? We have 2019 now
    – Black
    May 2, 2019 at 13:31
  • 1
    @Black still present in 1.9.4.1 ...
    – sv3n
    May 2, 2019 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.