删除产品出错

bug问题 · fecshoper · 于 6年前 发布 · 2106 次阅读
l Server Error
ajaxOptions: error
thrownError: Internal Server Error
Exception 'XSException' with message 'No route to host(C#113, localhost:8384)' 

in /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/lib/XSServer.class.php:477

Stack trace:
#0 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/lib/XSServer.class.php(172): XSServer->connect()
#1 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/lib/XSSearch.class.php(57): XSServer->open(8384)
#2 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/lib/XSServer.class.php(147): XSSearch->open(8384)
#3 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/lib/XS.class.php(450): XSServer->__construct(8384, Object(XS))
#4 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/lib/XS.class.php(186): XS->getSearch()
#5 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/wrapper/yii2-ext/Database.php(91): XSComponent->__get('search')
#6 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/wrapper/yii2-ext/QueryBuilder.php(72): hightman\xunsearch\Database->getSearch()
#7 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/wrapper/yii2-ext/ActiveQuery.php(343): hightman\xunsearch\QueryBuilder->build(Object(hightman\xunsearch\ActiveQuery))
#8 /alidata/www/yii2_fecshop/vendor/hightman/xunsearch/wrapper/yii2-ext/ActiveQuery.php(230): hightman\xunsearch\ActiveQuery->buildSearch(Object(hightman\xunsearch\Database))
#9 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/db/BaseActiveRecord.php(107): hightman\xunsearch\ActiveQuery->one()
#10 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/search/XunSearch.php(248): yii\db\BaseActiveRecord::findOne('59a9fb6a625a9c7...')
#11 [internal function]: fecshop\services\search\XunSearch->actionRemoveByProductId(Object(MongoDB\BSON\ObjectID))
#12 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/Service.php(48): call_user_func_array(Array, Array)
#13 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/Search.php(170): fecshop\services\Service->__call('removeByProduct...', Array)
#14 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/Search.php(170): fecshop\services\search\XunSearch->removeByProductId(Object(MongoDB\BSON\ObjectID))
#15 [internal function]: fecshop\services\Search->actionRemoveByProductId(Object(MongoDB\BSON\ObjectID))
#16 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/Service.php(48): call_user_func_array(Array, Array)
#17 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/product/ProductMongodb.php(422): fecshop\services\Service->__call('removeByProduct...', Array)
#18 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/product/ProductMongodb.php(422): fecshop\services\Search->removeByProductId(Object(MongoDB\BSON\ObjectID))
#19 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/Product.php(346): fecshop\services\product\ProductMongodb->remove('59a9fb6a625a9c7...')
#20 [internal function]: fecshop\services\Product->actionRemove('59a9fb6a625a9c7...')
#21 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/Service.php(48): call_user_func_array(Array, Array)
#22 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/app/appadmin/modules/Catalog/block/productinfo/Manageredit.php(594): fecshop\services\Service->__call('remove', Array)
#23 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/app/appadmin/modules/Catalog/block/productinfo/Manageredit.php(594): fecshop\services\Product->remove('59a9fb6a625a9c7...')
#24 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/app/appadmin/modules/Catalog/controllers/ProductinfoController.php(57): fecshop\app\appadmin\modules\Catalog\block\productinfo\Manageredit->delete()
#25 [internal function]: fecshop\app\appadmin\modules\Catalog\controllers\ProductinfoController->actionManagerdelete()
#26 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#27 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams(Array)
#28 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/Module.php(523): yii\base\Controller->runAction('managerdelete', Array)
#29 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/Application.php(102): yii\base\Module->runAction('catalog/product...', Array)
#30 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(yii\web\Request))
#31 /alidata/www/yii2_fecshop/appadmin/web/index.php(71): yii\base\Application->run()
#32 {main}

共收到 3 条回复
Fecmall#16年前 1 个赞

你把xunsearch关掉把,如果你不使用中文搜索,

因为默认中文用的是xunsearch,删除产品需要删除搜索引擎里面的数据,链接xunsearch失败造成的报错:

打开这个文件:

https://github.com/fecshop/yii2_fecshop/blob/master/config/services/Search.php

'xunSearch'  => [
                'class'        => 'fecshop\services\search\XunSearch',
                'enableService'        => true,
                /*
                'fuzzy' => true,  # 是否开启模糊查询
                'synonyms' => true, #是否开启同义词翻译
                'searchLang'    => [
                    'zh' => 'chinese',
                ],
                */
            ],

'enableService' => true, 改成 'enableService' => false,

但是,这里的文件你不能动,你不能修改vendor里面的文件,因此,你可以到这个文件里面修改:

https://github.com/fecshop/yii2_fecshop_app_advanced/blob/master/common/config/fecshop_local_services/Search.php

fecshoper#26年前 0 个赞

@Terry #1楼 我直接把xunsearch注释了,好像没有用,我改下配置

Fecmall#36年前 0 个赞

@fecshoper #2楼

如果注释,你需要注释所有,因为配置在2个配置文件中,vendor 和common中都有,注释一个是没有用的,

你按照我给你的办法处理把。在文件@common/config/fecshop_local_services/Search.php

'enableService' => true, 改成 'enableService' => false,

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics