Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已解决] Dx2.5 个人资料空白的 bug 的解决。

[复制链接]
人到中年V 发表于 2013-1-22 02:02:30 | 显示全部楼层 |阅读模式
问题原帖:https://discuz.dismall.com/thread-2921926-1-1.html

经过程序跟踪调试,终于找到原因,初始安装的论坛,可以正常编辑个人资料,之后安装一些插件或别的事务之后,编辑个人资料处出现空白。

分析程序,/source/include/spacecp/spacecp_profile.php

$defaultop = '';
$profilegroup = C::t('common_setting')->fetch('profilegroup', true);
foreach($profilegroup as $key => $value) {
    if($value['available']) {
        $defaultop = $key;
        break;
    }
}

$operation = in_array($_GET['op'], array('base', 'contact', 'edu', 'work', 'info', 'password', 'verify')) ? trim($_GET['op']) : $defaultop;

echo "== $operation ==";

正常的,$operation 是 base,可以正常编辑个人资料;

异常的,$operation 是 空串,右边出现空白。

从程序中不难看出,问题出在  C::t('common_setting')->fetch('profilegroup', true); 中。

修正该表记录即可。

 楼主| 人到中年V 发表于 2013-1-22 02:10:12 | 显示全部楼层
变量表 'common_setting' 中
异常记录
profilegroup | 0

正常记录
profilegroup | a:5:{s:4:"base";a:4:{s:9:"available";i:1;s:12:"displayorder";i:0;s:5:"title";s:8:"基本资料";s:5:"field";a:17:{s:8:"realname";s:8:"realname";s:6:"gender"; s:6:"gender"; s:8:"birthday";s:8:"birthday";s:9:"birthcity";s:9:"birthcity";s:10:"residecity";s:10:"residecity";s
:10:"residedist";s:10:"residedist";s:15:"affectivestatus";s:15:"affectivestatus";s:10:"lookingfor"; s:10:"lookingfor";s:9:"bloodtype";s:9:"bloodtype";s:6:"field1";s:6:"field1";s:6:"field2"; s:6:"field2";s:6:"field3"; s:6:"field3";s:6:"field4";s:6:"field4";s:6:"field5";s:6:"field5"; s:6
:"field6";s:6:"field6";s:6:"field7";s:6:"field7"; s:6:"field8";s:6:"field8";}}s:7:"contact";a:4:{s:5:"title";s:8:"联系方式";s:9:"available";s:
1:"1";s:12:"displayorder";s:1:"1";s:5:"field";a:7:{s:9:"telephone";s:9:"telephone";s:6:"mobile";s :6:"mobile";s:2:"qq";s:2:"qq";s:3:"msn";s:3:
"msn";s:6:"taobao";s:6:"taobao";s:3:"icq";s:3:"icq";s:5:"yahoo";s:5:"yahoo";}}s:3:"edu";a:4:{s:9:"available";i:1;s:12:"displayorder";i:2;s:5:
"title";s:8:"教育情况";s:5:"field";a:2:{s:14:"graduateschool";s:14:"graduateschool";s:9:"education";s:9:"education";}}s:4:"work";a:4:{s:9:"av
ailable";i:1;s:12:"displayorder";i:3;s:5:"title";s:8:"工作情况";s:5:"field";a:4:{s:7:"company";s:7:"company";s:10:"occupation";s:10:"occupati
on";s:8:"position";s:8:"position";s:7:"revenue";s:7:"revenue";}}s:4:"info";a:4:{s:5:"title";s:8:"个人信息";s:9:"available";s:1:"1";s:12:"disp
layorder";s:1:"4";s:5:"field";a:10:{s:10:"idcardtype";s:10:"idcardtype";s:6:"idcard";s:6:"idcard";s:7:"address";s:7:"address";s:7:"zipcode";s
:7:"zipcode";s:4:"site";s:4:"site";s:3:"bio";s:3:"bio";s:8:"interest";s:8:"interest";s:7:"sightml";s:7:"sightml";s:12:"customstatus";s:12:"cu
stomstatus";s:10:"timeoffset";s:10:"timeoffset";}}} |
回复

使用道具 举报

 楼主| 人到中年V 发表于 2013-1-22 02:13:18 | 显示全部楼层
本帖最后由 人到中年V 于 2013-1-22 02:42 编辑

update
  当前库.pre_common_setting c
set
  c.svalue = (select svalue from 初装库.pre_common_setting where  skey = 'profilegroup')
where
  c.skey = 'profilegroup'
回复

使用道具 举报

 楼主| 人到中年V 发表于 2013-1-22 02:14:03 | 显示全部楼层
是什么原因导致这个变量丢失呢?
回复

使用道具 举报

姜堰 发表于 2013-1-25 21:13:33 | 显示全部楼层
个人资料问题联系 QQ44326633
回复

使用道具 举报

姜堰 发表于 2013-1-25 21:13:54 | 显示全部楼层
提示: 该帖被管理员或版主屏蔽
回复

使用道具 举报

babyfacer 发表于 2013-1-25 23:28:27 | 显示全部楼层
你说的方法太抽象了,修复表,很多人都知道这是解决办法,但是如何操作呢?
回复

使用道具 举报

 楼主| 人到中年V 发表于 2013-1-26 00:53:11 | 显示全部楼层
babyfacer 发表于 2013-1-25 23:28
你说的方法太抽象了,修复表,很多人都知道这是解决办法,但是如何操作呢?

update
  当前库.pre_common_setting c
set
  c.svalue = (select svalue from 初装库.pre_common_setting where  skey = 'profilegroup')
where
  c.skey = 'profilegroup'

就是另外装个全新的论坛,从【新装库.pre_common_setting】中取出变量 'profilegroup' 对应的值,update到你当前正在使用,出了问题的表 当前库.pre_common_setting  中。
回复

使用道具 举报

babyfacer 发表于 2013-1-26 13:14:14 | 显示全部楼层
人到中年V 发表于 2013-1-26 00:53
update
  当前库.pre_common_setting c
set

算了,我是没能力看懂了
回复

使用道具 举报

 楼主| 人到中年V 发表于 2013-1-27 14:12:41 | 显示全部楼层
babyfacer 发表于 2013-1-26 13:14
算了,我是没能力看懂了

update
  pre_common_setting
set
  svalue =
'a:5:{s:4:"base";a:4: {s:9:"available";i:1;s:12:"displayorder";i:0;s:5:"title";s:8:"基本资料";s:5:"field";a:17:{s:8:"realname";s:8:"realname";s:6:"gender"; s:6:"gender"; s:8:"birthday";s:8:"birthday";s:9:"birthcity";s:9:"birthcity";s:10:"residecity";s:10:"residecity";s
:10:"residedist";s:10:"residedist";s:15:"affectivestatus";s:15:"affectivestatus";s:10:"lookingfor"; s:10:"lookingfor";s:9:"bloodtype";s:9:"bloodtype";s:6:"field1";s:6:"field1";s:6:"field2"; s:6:"field2";s:6:"field3"; s:6:"field3";s:6:"field4";s:6:"field4";s:6:"field5";s:6:"field5"; s:6
:"field6";s:6:"field6";s:6:"field7";s:6:"field7"; s:6:"field8";s:6:"field8";}}s:7:"contact";a:4:{s:5:"title";s:8:"联系方式";s:9:"available";s:
1:"1";s:12:"displayorder";s:1:"1";s:5:"field";a:7:{s:9:"telephone";s:9:"telephone";s:6:"mobile";s :6:"mobile";s:2:"qq";s:2:"qq";s:3:"msn";s:3:
"msn";s:6:"taobao";s:6:"taobao";s:3:"icq";s:3:"icq";s:5:"yahoo";s:5:"yahoo";}}s:3:"edu";a:4:{s:9:"available";i:1;s:12:"displayorder";i:2;s:5:
"title";s:8:"教育情况";s:5:"field";a:2: {s:14:"graduateschool";s:14:"graduateschool";s:9:"education";s:9:"education";}}s:4:"work";a:4:{s:9:"av
ailable";i:1;s:12:"displayorder";i:3;s:5:"title";s:8:"工作情况";s:5:"field";a:4:{s:7:"company";s:7:"company";s:10:"occupation";s:10:"occupati
on";s:8:"position";s:8:"position";s:7:"revenue";s:7:"revenue";}}s:4:"info";a:4: {s:5:"title";s:8:"个人信息";s:9:"available";s:1:"1";s:12:"disp
layorder";s:1:"4";s:5:"field";a:10:{s:10:"idcardtype";s:10:"idcardtype";s:6:"idcard";s:6:"idcard";s:7:"address";s:7:"address";s:7:"zipcode";s
:7:"zipcode";s:4:"site";s:4:"site";s:3:"bio";s:3:"bio";s:8:"interest";s:8:"interest";s:7:"sightml";s:7:"sightml";s:12:"customstatus";s:12:"cu
stomstatus";s:10:"timeoffset";s:10:"timeoffset";}}}'
where
  skey = 'profilegroup'

这样看得懂了吧。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-23 11:43 , Processed in 0.039607 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表