wzxjohn / moeSS

moe SS Front End for https://github.com/mengskysama/shadowsocks/tree/manyuser
https://ss.qaq.moe
GNU General Public License v3.0
303 stars 107 forks source link

管理套餐和购买流量界面都打不开 #26

Closed JAM2199562 closed 9 years ago

JAM2199562 commented 9 years ago

首先解释一下,本人不懂代码,github也不太会用,小白之处还望体谅,你这个项目蛮好的,我拿来做前端跟几个朋友分享,感谢您的劳动。 sql已经正常导入了,也能看见goods的表了,下面是问题的描述。 管理界面:admin/goods.html 报错:The page you requested was not found. 购买界面:user/view_goods.html 报错: Fatal error: Call to undefined method User_model::get_goods() in /webroot/application/controllers/User.php on line 902

A PHP Error was encountered

Severity: Error

Message: Call to undefined method User_model::get_goods()

Filename: controllers/User.php

Line Number: 902

Backtrace:

然后我简单做了个grep,大概是这个样子的 grep -ri get_goods ./* ./application/controllers/User.php: $data['goods'] = $this->user_model->get_goods(); 不懂代码,但是感觉这个get_goods就出现了一次怎么都不对吧?

JAM2199562 commented 9 years ago

然后发现还有一些bug貌似 /user.html

non-object

Filename: controllers/User.php

Line Number: 81

Backtrace:

File: /webroot/application/controllers/User.php Line: 81 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 81

Backtrace:

File: /webroot/application/controllers/User.php Line: 81 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 82

Backtrace:

File: /webroot/application/controllers/User.php Line: 82 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 94

Backtrace:

File: /webroot/application/controllers/User.php Line: 94 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 95

Backtrace:

File: /webroot/application/controllers/User.php Line: 95 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 96

Backtrace:

File: /webroot/application/controllers/User.php Line: 96 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 97

Backtrace:

File: /webroot/application/controllers/User.php Line: 97 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 98

Backtrace:

File: /webroot/application/controllers/User.php Line: 98 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 99

Backtrace:

File: /webroot/application/controllers/User.php Line: 99 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 100

Backtrace:

File: /webroot/application/controllers/User.php Line: 100 Function: _error_handler

File: /webroot/index.php Line: 292 Function: require_once

还有 /user/my_info.html non-object

Filename: controllers/User.php

Line Number: 346

Backtrace:

File: /webroot/application/controllers/User.php Line: 346 Function: _error_handler encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 347

Backtrace:

File: /webroot/application/controllers/User.php Line: 347 encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/User.php

Line Number: 348

Backtrace:

File: /webroot/application/controllers/User.php Line: 348

wzxjohn commented 9 years ago

请仔细查看中文说明。 中文说明 开源版本_没有支付功能_,任何支付有关的问题请不要提交 Issue.

wzxjohn commented 9 years ago

@JAM2199562 不过 /user.html 不应该出错,我测试过了开源版 /user.html 也不应该出现任何问题的。

JAM2199562 commented 9 years ago

支付功能我也用不到,这个无所谓,不过以后完美一点的话,把这个报错页面隐藏了或者在页面上显示为不可用应该会比现在好一点。 那个/user.html 咋说呢,页面最上面多了一堆报错,但是拉到最下面,还真是都完整显示了,也许这个也跟支付功能有关?

JAM2199562 commented 9 years ago

不管它了,还是很感谢,我把代码回滚回去用着好了

wzxjohn commented 9 years ago

支付功能不用的话直接在 application/views/user/user_sidebar.php 中删除 77-81 即可。 你的这个 User 绝对是出了问题,不要回滚代码。你看看是不是没导入 sql 文件?还是你的文件没有覆盖全?把你 User.php 81 行左右贴出来看一下吧。

JAM2199562 commented 9 years ago

代码我确实没改过的,除了首页一句话,别的都没动过,不过我已经降级了,现在一切都好,就不折腾了,多谢。

wzxjohn commented 9 years ago

@feisu 你也是升级之后出错?能说下升级过程吗?

lowprofileusername commented 9 years ago

我也是支付那边出错,不过我也不用。后来发现你说开源版本没有支付功能,任何支付有关的问题请不要提交 Issue.就没管啦。下面的那个BUG没遇到,我是全新安装。的我也是和JAM2199562一样的建议,开源版不包括代码的话默认应该不用显示出来,或者开个选项关闭该功能。 /user/view_goods.html /admin/goods.html admin/order_log.html 这些页面都会出错。

wzxjohn commented 9 years ago

@feisu 看来那个应该是个小范围的 Bug 或者是操作有误。明天我再尝试重现一下,然后把不提供的功能的入口都删掉好了。