skip to Main Content

I am developing a online store with Magento 2.2.2. I have to import customer from old site. The problem i am facing, in magento 2.2.2 customer grid is empty, even not a single grid title is showing (screenshot attached). enter image description here

I can add new customer successfully but new one also not showing in grid. If i try again with same email then showing customer already exists.

Solution I tried:

php bin/magento indexer:reindex

php bin/magento indexer:reindex customer_grid

php bin/magento cache:clean

php bin/magento cache:flush

Any one can help me? Did I miss anything? Is there any way that I can solve this problem?

2

Answers


  1. Chosen as BEST ANSWER

    After caching, re-indexing and trying few others things still i was unable to see customer in customer grid.

    Then I have decided to drop following tables and import from fresh magento.

    • store
    • store_group
    • store_website

    I had a fresh magento 2.2.2 installed and i export above 3 tables and import in my dev version and It works for me. I can see all existing customer in customer grid.

    I dont know what was the issue, i had no clue but after spending 2 days at last customer are back and that is enough for me now.


  2. First of all, check whether customer records exists in main table or not by using select * from customer_entity limit 2;

    Then, check customer grid table if records are available or not, use select * from customer_grid_flat limit 2;

    Before, reindexing it’s better to check the state of the indexer by select * from indexer_state;

    Then, update the status of re-index to make it invalid if the customer admin grid index status is valid or in working state by using below query

    update indexer_state set status = 'invalid' where status = 'working'
    

    1st Set invalid From Database:

    UPDATE `indexer_state` SET `status` = 'invalid' WHERE `indexer_state`.`indexer_id` ="indexer_id";
    

    2nd run Cli Magento:

    php bin/magento indexer:reindex

    Well, you’ve to update indexer_state because probably something went wrong during the re-index process, so because of that you need to reset the database entries.

    Re-index doesn’t work if the status of the index is not invalid (means re-index ignores the valid and working statuses.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search