Fecmall

第 2 位会员

会员
个人信息
  • 加入于 2017-05-31 17:38:45
  • 城市 Qingdao
  • GitHub https://github.com/fecshop
  • 最后登录时间 7天前
  • 签名 净化自己,潜心编码
个人简介
Terry,Fecmall开源产品作者,12年电商经验一线程序员开发者,擅长规划产品,架构设计。
个人成就
  • 发表文章次数 744
  • 发布回复次数 5760
  • 个人主页浏览次数 683
appserver 的 /catalog/category/index 接口出现 the $sort key specification must be an object 错误6年前

1.再说一遍!!!请把报错信息更新到帖子标题里面:the $sort key specification must be an object

2.fecshop默认的功能没有问题,找一个fecshop使用这个函数的api,然后在fecshop默认的功能上面增删代码,然后就知道那个地方导致的问题了

3.google搜索了下,有几个贴一下链接,你琢磨一下把 https://stackoverflow.com/questions/28071517/the-sort-key-specification-must-be-an-object

https://answer-id.com/28071517

4.你的代码也没有贴上来,本人本地无法重新你的问题,只能你自己解决了。

打开任意页面特别是需要读取数据的页面时总是出现下图错误,有时候即使出错了也会继续打开页面,几秒后又能将页面打开6年前

你在web目录下面弄一个静态的html文件,譬如 22.html,浏览器访问这个文件试试, 看看是否也会出这个问题,如果静态文件也出问题,那么说明apache的配置有问题。

appserver 的 /catalog/category/index 接口出现 the $sort key specification must be an object 错误6年前

$filter 打印出来的数据:

array(6) { ["pageNum"]=> int(1) ["numPerPage"]=> int(12) ["orderBy"]=> array(1) { ["score"]=> int(-1) } ["where"]=> array(1) { ["category"]=> string(24) "57b6abfff656f246653bf570" } ["select"]=> array(19) { [0]=> string(3) "sku" [1]=> string(3) "spu" [2]=> string(4) "name" [3]=> string(5) "image" [4]=> string(5) "price" [5]=> string(13) "special_price" [6]=> string(12) "special_from" [7]=> string(10) "special_to" [8]=> string(7) "url_key" [9]=> string(5) "score" [10]=> string(23) "reviw_rate_star_average" [11]=> string(12) "review_count" [12]=> string(5) "score" [13]=> string(12) "review_count" [14]=> string(14) "favorite_count" [15]=> string(10) "created_at" [16]=> string(3) "qty" [17]=> string(11) "final_price" [18]=> string(11) "final_price" } ["group"]=> string(4) "$spu" }
appserver 的 /catalog/category/index 接口出现 the $sort key specification must be an object 错误6年前

1.markdown格式看一下 http://www.fecshop.com/markdown

2.发帖说明:http://www.fecshop.com/topic/624 ,出现问题,仔细看报错log,报错信息是he $sort key specification must be an object,发帖得把报错信息写到title里面

3.打印一下你的信息

#3 /mnt/hgfs/mywww/zl-mark/server/fecshop/vendor/fancyecommerce/fecshop/services/product/ProductMongodb.php(546): fecshop\\services\\product\\ProductMongodb->getFrontCategoryProductsGroupBySpu(Array)"

$filter打印一下,看看数据

public function getFrontCategoryProducts($filter){
        if (Yii::$service->product->productSpuShowOnlyOneSku) {
            
            return $this->getFrontCategoryProductsGroupBySpu($filter);
        } else {
            
            return $this->getFrontCategoryProductsAll($filter);
        }
    }

4.按照,照葫芦画瓢的方式,找一个可以正常的部分,打印一$filter, 比对一下数据的差异,导致这个问题的原因,应该是你传递的$filter参数格式有问题

5.如果解决问题,请在帖子回复一下出现这个问题的原因,以及如何解决这个问题。

支付时出现了错误6年前

1.请将报错信息贴到标题里面,先看一下发帖说明:http://www.fecshop.com/topic/624

2.这个报错,参看帖子: http://www.fecshop.com/topic/1730

关于$cart_id与$increment_id的一些问题与思考6年前

以为支持游客购物车和游客下单,因此cart_id和 订单放到了session services里面。

你出现这个问题的原因,找到了吗?

关于$cart_id与$increment_id的一些问题与思考6年前

你能找一下具体,是什么原因导致你出现的这个问题吗?

关于$cart_id与$increment_id的一些问题与思考6年前

Yii::$service->session->get() 执行的是 https://github.com/fecshop/yii2_fecshop/blob/master/services/session/SessionRedis.php

最终的存储并不是放到php session里面

public function set($key, $val, $timeout)
    {
        $key = $this->getSessionKey($key);
        $val = $val . $this->valSeparator . time();
        return (bool) Yii::$app->redis->executeCommand('SET', [$key, $val, 'EX', $timeout]);
    }
    public function get($originKey, $reflush)
    {
        $key = $this->getSessionKey($originKey);
        $data = Yii::$app->redis->executeCommand('GET', [$key]);
        $arr = explode($this->valSeparator, $data);
        if (count($arr) < 2) {
            return '';
        }
        $val = $arr[0];
        $timeout = $arr[1];
        if (Yii::$service->session->isUpdateTimeOut($timeout) && $val) {
            $this->set($originKey, $val, $timeout);
        }
        return $val === false || $val === null ? '' : $val;
    }
    public function remove($key)
    {
        $key = $this->getSessionKey($key);
        Yii::$app->redis->executeCommand('DEL', [$key]);
        // @see https://github.com/yiisoft/yii2-redis/issues/82
        return true;
    }

执行的是 Yii::$app->redis->executeCommand

通过宝塔(百度云源码)安装,不知道安装是否成功6年前

安装失败。

这样的帖子,你让别人怎么诊断问题?发帖说明:http://www.fecshop.com/topic/624

注册登录验证码不显示6年前

@Kittyfamous #9楼 嗯,不能有空行,默认是没有空行的。

在分类下添加的产品,通过接口获取的数据好奇怪6年前

@tgy3300 #2楼 fecshop很很多端口,appserver appapi端,得说明一下端口

细致看了一下你说的问题,是这样的,返回数据是正确的,打开:http://demo.fancyecommerce.com/#/catalog/category/57bea0d3f656f2ec1f3bf56e ,进行下拉,瀑布流部分,加载的是这个接口, 这个是为了满足瀑布流的加载,直接生成了这种数据格式,如果这个数据格式不满足你的需要,你可以重写这个部分的代码

注册登录验证码不显示6年前

@Kittyfamous [#6楼](#comment6) debug一下,查看一下原因,可能是php环境等问题导致的,我的环境是正常的,不能重现这个问题。

在分类下添加的产品,通过接口获取的数据好奇怪6年前

1.通过接口,是那个入口访问的url?先看一下发帖说明:http://www.fecshop.com/topic/624

2.你访问的,应该是appserver:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-server-api-category-product.html

你打印的是否是这个端口,这个是和第三方erp进行对接的端口,如果做手机端vue端等,请使用appserver端

建议优化appfront!Undefined index: fecshoplang 最新版1.7.0.06年前

@webmaster #2楼 这个带来性能损耗?有相关资料说明一下吗?

这个不是错误,只是忽略掉 E_NOTICEE_COMPILE_WARNING

FecShop 的登录认证方式6年前

@STM32King #2楼 vue请用appserver,如果你强行这样搞,你也可以自己从零写个商城。

fecshop更新到1.7版本,后台界面显示异常6年前

@appadmin/theme/local/theme01/assets/css/my.css更新下,添加下面的内容覆盖。

.accordion .accordionHeader h2 span{
    background: none;
    display: none;
}

.accordion .accordionHeader h2{
    padding-left:10px;
}
Your Site Analytics