Magento reindexes无效 - magento2

时间:2017-05-02 15:11:48

标签: magento2

我正在使用

对所有产品进行重新索引
php bin/magento indexer:reindex

但是当我第一次通过我运行此命令时出现错误:

    PHP Fatal error:  Maximum function nesting level of '256' reached, aborting! in /var/www/html/solen_magento/vendor/magento/framework/Config/Scope.php on line 48
PHP Stack trace:
PHP   1. {main}() /var/www/html/solen_magento/bin/magento:0
PHP   2. Symfony\Component\Console\Application->run() /var/www/html/solen_magento/bin/magento:25
PHP   3. Magento\Framework\Console\Cli->doRun() /var/www/html/solen_magento/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRun() /var/www/html/solen_magento/vendor/magento/framework/Console/Cli.php:49
PHP   5. Symfony\Component\Console\Application->doRunCommand() /var/www/html/solen_magento/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Symfony\Component\Console\Command\Command->run() /var/www/html/solen_magento/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. Magento\Indexer\Console\Command\IndexerReindexCommand->execute() /var/www/html/solen_magento/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   8. Magento\Indexer\Model\Indexer->reindexAll() /var/www/html/solen_magento/vendor/magento/module-indexer/Console/Command/IndexerReindexCommand.php:38
PHP   9. Magento\CatalogSearch\Model\Indexer\Fulltext->executeFull() /var/www/html/solen_magento/vendor/magento/module-indexer/Model/Indexer.php:412
PHP  10. Magento\CatalogSearch\Model\Indexer\IndexerHandler->saveIndex() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/Fulltext.php:111
PHP  11. Magento\Framework\Indexer\SaveHandler\Batch->getItems() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/IndexerHandler.php:94
PHP  12. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->rewind() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/IndexerHandler.php:23
PHP  13. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:264

.
.
.
.
PHP 251. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:204
PHP 252. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:204
PHP 253. Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator->next() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:204
PHP 254. Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->getId() /var/www/html/solen_magento/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php:195
PHP 255. Magento\Framework\Interception\PluginList\PluginList->getNext() /var/www/html/solen_magento/var/generation/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php:1712
PHP 256. Magento\Framework\Interception\PluginList\PluginList->_loadScopedData() /var/www/html/solen_magento/vendor/magento/framework/Interception/PluginList/PluginList.php:249

但是,当我第二次运行此命令时,它成功运行并输出如下:

Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:02
Product Categories index has been rebuilt successfully in 00:00:01
Product Price index has been rebuilt successfully in 00:00:02
Product EAV index has been rebuilt successfully in 00:00:01
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:00
Stock index has been rebuilt successfully in 00:00:00

因此基于此索引成功完成,但是当我尝试在磁盘中搜索产品时,它在搜索结果中没有显示。

所以我从管理面板刷新了所有缓存。 然后从var目录中删除所有文件 使用

再次生成所有静态文件
php bin/magento setup:static-content:deploy en_US fr_FR

但它还是不起作用。

但是当我编辑来自支持的任何产品然后我试图搜索它的工作。

那么任何人都可以帮助我吗?

提前致谢。

1 个答案:

答案 0 :(得分:0)

在使用激活的Xdebug模式执行“目录搜索”索引时,主要调用该错误。

在某些来源中,专家建议在php.ini文件中增加

xdebug.max_nesting_level
的值。 这个解决方案对我来说没有用。

最后我禁用了“ xdebug ”。 索引成功完成。

xdebug - 可以从php.ini停用 如果该文件中不存在。
然后查看conf.d/文件夹。