skip to Main Content

I installed magento 2.4.0 on my Linux server from godaddy. I’m unable to add the products to it. It is showing the Error is The stock item was unable to be saved. Please try again. Can any one help me from this pleaseenter image description here

7

Answers


  1. Please change all indexer as Update by Schedule mode in system-> index management. It’s working for me.

    Login or Signup to reply.
  2. Go to Magento 2.4.2 installation location:

    cd /var/www/html
    

    Flush cache

    sudo php bin/magento cache:flush
    

    Chek Indexer Status

    php bin/magento indexer:status
    

    Reset Indexer

    php bin/magento indexer:reset
    

    Reindex Indexer

    php bin/magento indexer:reindex
    

    Chek Indexer Status

    php bin/magento indexer:status
    

    Chek indexer Info

    php bin/magento indexer:info
    

    Finally Flush Cache

    php bin/magento cache:flush
    

    Restart
    sudo reboot


    Login to admin and check

    Login or Signup to reply.
  3. I have fixed it. There was an entry missing in cataloginventory_stock

    try to run this query

    INSERT INTO cataloginventory_stock (stock_id, website_id, stock_name) VALUES ('1', '1', 'default');
    
    Login or Signup to reply.
  4. If you are using Elasticsearch instead of Mysql. then please check once that elasticsearch is working or not.

    sudo service elasticsearch status    // for checking the Running Status
    sudo service elasticsearch start    // for Start
    sudo service elasticsearch restart    // for Restart
    
    Login or Signup to reply.
  5. I’ve Migrated the magento 2.3.x into 2.4.x. I faced the same issues.
    I’ve resolved this issue the following way.

    1. INSERT INTO cataloginventory_stock (stock_id, website_id, stock_name) VALUES (‘1’, ‘1’, ‘default’);

    2. php bin/magento indexer:reindex

    3. php bin/magento cache:flush

    But still i am facing the same issue, then I did the below steps.

    1. mysqldump –single-transaction -u root -p mydb –triggers | sed -e ‘s/DEFINER[ ]=[ ][^]*/*/’ > mydb_without_definer.sql
    2. DROP DATABASE mydb;
    3. create DATABASE mydb;
    4. mysql -u root -p mydb < mydb_without_definer.sql
    5. php bin/magento indexer:reindex
    6. php bin/magento cache:flush

    Thank you!
    Pilathraj

    Login or Signup to reply.
  6. Make sure you have Elastic search service active status ?

    service elasticsearch status
    
    Login or Signup to reply.
  7. I had the same issue, I just had to execute:

    php bin/magento indexer:reindex
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search