idcsmart / ZJMF-CBAP

https://www.idcsmart.com
GNU Affero General Public License v3.0
127 stars 32 forks source link

10.4.6 用户,获取产品列表错误 #30

Open Liangdi opened 1 month ago

Liangdi commented 1 month ago

接口:/console/v1/product?keywords=&id=2&page=1&limit=12 错误信息

[20-Aug-2024 12:23:55 Asia/Shanghai] PHP Fatal error:  Uncaught think\exception\ErrorException: include(/opt/deploy/idc/10.4.6/public/clientarea/template/default/NotFound.php): failed to open stream: No such file or directory in /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php:231
Stack trace:
#0 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(231): think\initializer\Error->appError(2, 'include(/opt/de...', '/opt/deploy/idc...', 231, Array)
#1 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(231): include()
#2 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(206): think\exception\Handle->renderExceptionContent(Object(think\exception\ErrorException))
#3 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(111): think\exception\Handle->convertExceptionToResponse(Object(think\exception\ErrorException))
#4 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/initializer/Error.php(58): think\exception\Handle->ren in /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php on line 231
[20-Aug-2024 12:23:55 Asia/Shanghai] PHP Fatal error:  Uncaught think\exception\ErrorException: include(/opt/deploy/idc/10.4.6/public/clientarea/template/default/NotFound.php): failed to open stream: No such file or directory in /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php:231
Stack trace:
#0 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(231): think\initializer\Error->appError(2, 'include(/opt/de...', '/opt/deploy/idc...', 231, Array)
#1 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(231): include()
#2 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(206): think\exception\Handle->renderExceptionContent(Object(think\exception\ErrorException))
#3 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php(111): think\exception\Handle->convertExceptionToResponse(Object(think\exception\ErrorException))
#4 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/initializer/Error.php(58): think\exception\Handle->ren in /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/exception/Handle.php on line 231
Liangdi commented 1 month ago

我看模板目录都加了 pc 和 mobile 我在 config/app.php 里面修改了 exception_tmpl 错误信息没有了,但是接口还是没有数据, 显示 404

Liangdi commented 1 month ago

再跟踪了一下,看看怎么处理把, php 7.3 mysql 5.7

think\db\exception\PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'idc.ss.module' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in /opt/deploy/idc/10.4.6/vendor/topthink/think-orm/src/db/PDOConnection.php:796
Stack trace:
#0 /opt/deploy/idc/10.4.6/vendor/topthink/think-orm/src/db/PDOConnection.php(710): think\db\PDOConnection->getPDOStatement('SELECT `p`.`id`...', Array, false, false)
#1 /opt/deploy/idc/10.4.6/vendor/topthink/think-orm/src/db/PDOConnection.php(921): think\db\PDOConnection->pdoQuery(Object(think\db\Query), 'SELECT `p`.`id`...')
#2 /opt/deploy/idc/10.4.6/vendor/topthink/think-orm/src/db/BaseQuery.php(1110): think\db\PDOConnection->select(Object(think\db\Query))
#3 /opt/deploy/idc/10.4.6/app/common/model/ProductModel.php(136): think\db\BaseQuery->select()
#4 /opt/deploy/idc/10.4.6/app/home/controller/ProductController.php(103): app\common\model\ProductModel->productList(Array)
#5 [internal function]: app\home\controller\ProductController->list()
#6 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Container.php(343): ReflectionMethod->invokeArgs(Object(app\home\controller\ProductController), Array)
#7 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/route/dispatch/Controller.php(110): think\Container->invokeReflectMethod(Object(app\home\controller\ProductController), Object(ReflectionMethod), Array)
#8 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(59): think\route\dispatch\Controller->think\route\dispatch\{closure}(Object(think\Request))
#9 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(66): think\Pipeline->think\{closure}(Object(think\Request))
#10 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/route/dispatch/Controller.php(113): think\Pipeline->then(Object(Closure))
#11 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/route/Dispatch.php(116): think\route\dispatch\Controller->exec()
#12 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Route.php(772): think\route\Dispatch->run()
#13 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(59): think\Route->think\{closure}(Object(think\Request))
#14 /opt/deploy/idc/10.4.6/app/http/middleware/RejectRepeatRequest.php(31): think\Pipeline->think\{closure}(Object(think\Request))
#15 [internal function]: app\http\middleware\RejectRepeatRequest->handle(Object(think\Request), Object(Closure))
#16 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Middleware.php(142): call_user_func(Array, Object(think\Request), Object(Closure))
#17 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(85): think\Middleware->think\{closure}(Object(think\Request), Object(Closure))
#18 /opt/deploy/idc/10.4.6/app/http/middleware/ParamFilter.php(42): think\Pipeline->think\{closure}(Object(think\Request))
#19 [internal function]: app\http\middleware\ParamFilter->handle(Object(think\Request), Object(Closure))
#20 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Middleware.php(142): call_user_func(Array, Object(think\Request), Object(Closure))
#21 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(85): think\Middleware->think\{closure}(Object(think\Request), Object(Closure))
#22 /opt/deploy/idc/10.4.6/app/http/middleware/Check.php(34): think\Pipeline->think\{closure}(Object(think\Request))
#23 [internal function]: app\http\middleware\Check->handle(Object(think\Request), Object(Closure))
#24 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Middleware.php(142): call_user_func(Array, Object(think\Request), Object(Closure))
#25 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(85): think\Middleware->think\{closure}(Object(think\Request), Object(Closure))
#26 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php(61): think\Pipeline->think\{closure}(Object(think\Request))
#27 [internal function]: think\middleware\AllowCrossDomain->handle(Object(think\Request), Object(Closure), Array)
#28 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Middleware.php(142): call_user_func(Array, Object(think\Request), Object(Closure), Array)
#29 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(85): think\Middleware->think\{closure}(Object(think\Request), Object(Closure))
#30 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(66): think\Pipeline->think\{closure}(Object(think\Request))
#31 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Route.php(773): think\Pipeline->then(Object(Closure))
#32 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Http.php(219): think\Route->dispatch(Object(think\Request), Object(Closure))
#33 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Http.php(208): think\Http->dispatchToRoute(Object(think\Request))
#34 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(59): think\Http->think\{closure}(Object(think\Request))
#35 /opt/deploy/idc/10.4.6/vendor/topthink/think-trace/src/TraceDebug.php(71): think\Pipeline->think\{closure}(Object(think\Request))
#36 [internal function]: think\trace\TraceDebug->handle(Object(think\Request), Object(Closure))
#37 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Middleware.php(142): call_user_func(Array, Object(think\Request), Object(Closure))
#38 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(85): think\Middleware->think\{closure}(Object(think\Request), Object(Closure))
#39 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Pipeline.php(66): think\Pipeline->think\{closure}(Object(think\Request))
#40 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Http.php(209): think\Pipeline->then(Object(Closure))
#41 /opt/deploy/idc/10.4.6/vendor/topthink/framework/src/think/Http.php(172): think\Http->runWithRequest(Object(think\Request))
#42 /opt/deploy/idc/10.4.6/public/index.php(22): think\Http->run()
#43 {main}
Liangdi commented 1 month ago

和数据库的里面的 sql_mode=only_full_group_by 默认设置有关系, 降级部署 mysql 5.6 暂时可以用系统了