redmine1.1.3版本有bug,会出现内部错误,在增加缺陷时,特殊情况下会出现500错误,主要原因是操作issue表时候出现lft或rgt等于空
redmine1.1.3版本有bug,会出现内部错误,在增加缺陷时,特殊情况下会出现500错误,主要原因是操作issue表时候出现lft或rgt等于空
很是奇怪,早上来同时反馈说redmine在访问部分项目的“问题”模块的时候,会出现内部错误,简单了分析了一下,应该不是程序有问题,应该是数据有问题导致的,因为并不是所有的项目的问题模块都会出现内部错误,查看日志提示错误在:
app/helper/issue_help.rb第28行,但是因为大多数项目是好的,只有部分项目有问题,所以估计应该还是数据出问题了。
# redMine - project management software# Copyright (C) 2006 Jean-Philippe Lang## This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License# as published by the Free Software Foundation; either version 2# of the License, or (at your option) any later version.# # This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.module IssuesHelper include ApplicationHelper def issue_list(issues, &block) ancestors = [] issues.each do |issue| while (ancestors.any? && !issue.is_descendant_of?(ancestors.last)) ancestors.pop end yield issue, ancestors.size ancestors << issue unless issue.leaf? end end
?
?
通过使用 MySQL Workbench(MySQL Workbench-mysql开源图形客户端,终于可以抛弃command line),最终发现issue表中,
SELECT * FROM redmine.issues where lft is null or rgt=null
?
发现有lft或rgt为null,从而导致了内部500错误,修改此部分数据,问题解决,但是为何出现此种问题?目前还没有排查出来
?
?
作者:无名程序员
微博:weibo.com/wmcxy
blog:wmcxy.iteye.com
转载请注明原作者,谢谢配合!