Steps to reproduce
when I do reindex as below, I get the following error. Everythign else works except customer is not getting re-indexed. So the in admin I cannot see any customers either although customers are there.
php -f bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
SELECT e._, e.entity_id, TRIM(CONCAT_WS(' ', IF(e.prefix <> '', e.prefix, NULL), IF(e.firstname <> '', e.firstname, NULL), IF(e.middlename <> '', e.middlename, NULL), IF(e.lastname <> '', e.lastname, NULL), IF(e.suffix <> '', e.suffix, NULL))) AS name, e.email, e.group_id, e.created_at, e.website_id, e.confirmation, e.created_in, e.dob, e.gender, e.taxvat, e.lock_expires, TRIM(CONCAT_WS(' ', IF(shipping.street <> '', shipping.street, NULL), IF(shipping.city <> '', shipping.city, NULL), IF(shipping.region <> '', shipping.region, NULL), IF(shipping.postcode <> '', shipping.postcode, NULL))) AS shipping_full, TRIM(CONCAT_WS(' ', IF(billing.street <> '', billing.street, NULL), IF(billing.city <> '', billing.city, NULL), IF(billing.region <> '', billing.region, NULL), IF(billing.postcode <> '', billing.postcode, NULL))) AS billing_full, billing.firstname AS billing_firstname, billing.lastname AS billing_lastname, billing.telephone AS billing_telephone, billing.postcode AS billing_postcode, billing.country_id AS billing_country_id, billing.region AS billing_region, billing.street AS billing_street, billing.city AS billing_city, billing.fax AS billing_fax, billing.vat_id AS billing_vat_id, billing.company AS billing_company FROM customer_entity AS e
LEFT JOIN customer_address_entity AS shipping ON shipping.entity_id=e.default_shipping
LEFT JOIN customer_address_entity AS billing ON billing.entity_id=e.default_billingCustomer Grid indexer process unknown error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.lock_expires' in 'field list', query was: SELECT e._, e.entity_id, TRIM(CONCAT_WS(' ', IF(e.prefix <> '', e.prefix, NULL), IF(e.firstname <> '', e.firstname, NULL), IF(e.middlename <> '', e.middlename, NULL), IF(e.lastname <> '', e.lastname, NULL), IF(e.suffix <> '', e.suffix, NULL))) AS name, e.email, e.group_id, e.created_at, e.website_id, e.confirmation, e.created_in, e.dob, e.gender, e.taxvat, e.lock_expires, TRIM(CONCAT_WS(' ', IF(shipping.street <> '', shipping.street, NULL), IF(shipping.city <> '', shipping.city, NULL), IF(shipping.region <> '', shipping.region, NULL), IF(shipping.postcode <> '', shipping.postcode, NULL))) AS shipping_full, TRIM(CONCAT_WS(' ', IF(billing.street <> '', billing.street, NULL), IF(billing.city <> '', billing.city, NULL), IF(billing.region <> '', billing.region, NULL), IF(billing.postcode <> '', billing.postcode, NULL))) AS billing_full, billing.firstname AS billing_firstname, billing.lastname AS billing_lastname, billing.telephone AS billing_telephone, billing.postcode AS billing_postcode, billing.country_id AS billing_country_id, billing.region AS billing_region, billing.street AS billing_street, billing.city AS billing_city, billing.fax AS billing_fax, billing.vat_id AS billing_vat_id, billing.company AS billing_company FROM customer_entity AS e
...
[Example] Error message appears: "Cannot save quote".
BTW, I am using magento 2.1.0
Ubuntu 15
mysql
I'm facing this issue too and I think it related to migrate database before upgrade
zindont , you are right, I have this issue after data migration ( magento 1.7). For now, I have resolved the issue by manually adding the lock_expires column in the DB. After this, I was able to move forward with installation. However, I hope this release actual fix.
@hvohra
Thanks for reporting.
To allow us to research the issue, please, provide description according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.
Please, provide the used version also. If the problem is actual for a specific tag, please, specify it and be sure that the latest update was used.
The issue happen while reindex after migrate data from Magento 1 to Magento 2. Because the _lock_expires_ column appear in _Magento_Customer_ component version 2.0.7 but your database schema of this component is still old version (below 2.0.7). You need to re-run _composer update_ and _magento setup:upgrade_ before reindex the data.
There is any way to solve it? i cant upgrade magento 2.1.2 to magento 2.1.5 because of this issue and i had to re-install magento 2 again . please help me to prevent it
@refaelgold @zindont Please check table "customer_entity" and check column 'failures_num',first_failure,lock_expires.
if not available than create
'failures_num', smallint(6) default 0
first_failure timestamp default NULL
lock_expires. imestamp default NULL
after that run reindex command
@manish10188
THANK YOU. This helped us solve a customer login problem after upgrading from 2.1.0 > 2.1.6 (after having upgraded from 1.9 > 2.1)
@manish10188 perfect!!!!!!!! thanks!
Comments above suggest that issue is resolved.
Closing. Please reopen if problem persists.
Thanks @manish10188
Thanks @manish10188
Most helpful comment
@refaelgold @zindont Please check table "customer_entity" and check column 'failures_num',first_failure,lock_expires.
if not available than create
'failures_num', smallint(6) default 0
first_failure timestamp default NULL
lock_expires. imestamp default NULL
after that run reindex command