讨论 Bug反馈 栏目管理 更新的时候报错是个sql错误

栏目管理 更新的时候报错是个sql错误

周小云 发表于    阅读:142    回复:12

Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'captchaProvider' in 'field list' (SQL: update `cms_cat` set `updated_at` = 2024-07-15 16:52:00, `title` = 健康资讯, `subTitle` = 健康资讯最新动态,快速了解, `visitMemberGroupEnable` = 0, `visitMemberVipEnable` = 0, `pageTemplate` = , `formTemplate` = , `enable` = 1, `captchaProvider` =  where `id` = 1)' in /www/wwwroot/cms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:666

spacer.gif

评论

这个可能是你升级不完全导致的,字段没有加上。

可执行命令 php artisan modstart:module-install Cms

 

@ModStart: 我宝塔直接下的

 

@ModStart: You can't run this command as root ( uid = 0 ).  要搞个子账号吗


 

最新的系统使用了是否使用 root 运行 php artisan 命令的检测,如果是 root 用户运行会提示 You can't run this command as root ( uid = 0 ). 错误。

解决方法:

sudo -u www /xxx/bin/php /www/example.com/artisan xxx

其中,

  • www 为运行用户,通常为 www 或 www-data

    • 宝塔环境下,默认用户是 www

  • /xxx/bin/php 为 PHP 的运行路径

    • 宝塔环境下,通常为 /www/server/php/56/bin/php 或 /www/server/php/70/bin/php

  • /www/example.com/artisan 为 artisan 命令的路径

    • 宝塔环境下,通常为 /www/wwwroot/example.com/artisan


参考:https://modstart.com/doc/install/qa.html

 

Module Migrate Success

Nothing to migrate.

Module Asset Publish : Ignore

Module Install Success

还是不行 我是宝塔下的 是不是不对啊

 

或者我能不能直接改数据库  然后清下缓存呢

 

我数据库里面有这个字段 但是页面没有这个字段的提交  关键还不知道什么版本

 



是8.6 我看了下你们git是最新的

 

你看你的cms_cat没有captchaProvider这个字段吗?如果没有这个字段,尝试重新安装一下。

 

@ModStart: 数据库有这个字段

 

@ModStart:
是前端提交的时候没有这个东西报错了好像    

 

重新收集下日志发出来


① 删除storage/logs/ 里面的.log日志文件,日志清空

② 重新再操作一

③ 把新收集的日志文件内容发出来下一下

 
1
我来评论
QQ
微信