3

I installed Magento but in admin panel it is giving system message as:

One or more indexers are invalid. Make sure your Magento cron job is running

If I am adding categories or products from admin panel It shows no effect on front-end and not even menu and categories are displayed.

  • You should reindex manually when you update product data, but you won't be able to run the cron on windows – Robbie Averill Dec 24 '15 at 5:52
  • I do not recommend use Magento direct on Windows. Please use virtualization to install on supported os. – KAndy Dec 24 '15 at 7:47
  • @Sanjay As KAndy mentioned, Windows is not officially tested and supported platform for Magento 2. Take a look at vagrant project optimized for Magento 2 development on Windows. – Alex Paliarush Dec 24 '15 at 9:24
2

You must configure a cron.job in your server to automate a some internal tasks like reindexing, email sending and cleaning between others, there is 3 cron jobs in magento2 you will find all information about that in:

Configure and run cron

Magento has a complex db schema to save categories and products data and "render" all these information to a single table per store if you have configured use flat categories and/or use flat catalog to grant performance on the frontend. This would be the reason why you don't see categories on frontend.

Remember always clean/flush cache too

2

You can create cron.bat file like this

@echo off
cls
:start
echo This is a loop
cd %magento_root%
bin/magento cron:run
sleep 10
goto start

to emulate cron.

2

reindex magento2 using command

Your path like

var\www\html\magento2\bin

Now You have to enter command

sudo php magento indexer:reindex

Show your index management all indexes are re-indexed.

I hope this will help you.

2

you have issue of indexing. You can indexing using cli, Commnad php magento indexer:reindex

After successfully run indexing , your issue are gone.

Thanks.

2

You have to run indexing command. if you are using windows than run below command in cmd. you have to run these commands in your magento root directory:

php bin/magento indexer:reindex
php bin/magento cache:clean

NOTE: If you have just installed magento than you might need to run below commands as well:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:clean
0

As others have pointed out if indexer is stuck you'll have to change it manually in db,

UPDATE indexer_state SET status = 'valid';

https://magento.stackexchange.com/a/126102/45516

Hope this helps,

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.