php - Silverstripe/admin/突然停止工作

标签 php mysql admin silverstripe

目前我正在开发一个 SilverStripe 项目,一切似乎都进展顺利。 但后来事情发生了变化..今天早上我尝试登录,但收到消息说发生了错误。 在开发模式下运行出现以下错误消息:

[User Error] Couldn't run query: SELECT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaTitle", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."MetaKeywords", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."HomepageForDomain", "SiteTree_Live"."ProvideComments", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."Status", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."ToDo", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID",

阅读完整错误消息:http://pastebin.com/TrjrEzUn

... WHERE ("SiteTree_Live"."ClassName" IN ('Page','BlogEntry','BlogTree','DienstHolder','DienstPage','FaqHolder','FaqPage','FrontPage','MemberPage','TeamPage','ErrorPage','RedirectorPage','VirtualPage','UserDefinedForm','BlogHolder')) AND (ParentID = ) ORDER BY "Sort" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY "Sort"' at line 1 
GET /Security/login?BackURL=%2Fadmin

Line 525 in /home/admin/domains/stargroup.nl/public_html/sapphire/core/model/MySQLDatabase.php

我检查了 mysql 的空类名,有些找到了,但得到了正确的类名。 有人对如何克服此错误并让登录重新恢复工作有任何建议吗?

提前致谢!

最佳答案

发布的查询中的问题是其中一个参数缺少值 - 就在末尾:

AND (ParentID = ) ORDER BY "Sort"

在不了解 silverstripe 的情况下,我猜测您的一篇文章/帖子不知何故缺少 ID 或 ParentID。

关于php - Silverstripe/admin/突然停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9699331/

相关文章:

php mysql 在十个表+不同列上构建搜索查询

mysql - 如何加快mysql查询速度

macos - 在 Mac OS 上卸载/加载应用内内核扩展

HTML5 ContentEditable 仅在登录时可用

php - mysql基本插入语句错误1064

javascript - 点击特定类触发下拉事件

php - 在 Linux 中创建基于文件的 Cron 作业

mysql - MySQL计数查询使用WHERE子句花费的时间太长

mysql - SQL Query SELECT 和 Group by 条件

html - 当我在 Angular 中单击它时,如何在导航中获取名称菜单