<samp id="ztxok"><strong id="ztxok"><u id="ztxok"></u></strong></samp>
    <b id="ztxok"><ins id="ztxok"><u id="ztxok"></u></ins></b><progress id="ztxok"></progress>

      1. <samp id="ztxok"><ins id="ztxok"><ruby id="ztxok"></ruby></ins></samp>

        DedeCMS会员编辑文章提示“数据校验不对,程序返回”的解决办法

        2017-12-23 15:04:26来源:威易网作者:

        今天用DedeCMS,在用户中心文章中添加了一些自定义字段,结果发现修改文章的时候提示“数据校验不对,程序返回”。

        今天用DedeCMS,在用户中心文章中添加了一些自定义字段,结果发现修改文章的时候提示“数据校验不对,程序返回”。

        1、修改 member\inc\inc_archives_functions.php 文件

        找到这段,红色部分是增加的两行

        /**
         *  载入自定义表单(用于编辑)
         * @bug  修正编辑时候没有输出dede_fieldshash输入框 by  uu6c.com
         * @param     string  $fieldset
         * @param     string  $fieldValues
         * @param     string  $loadtype
         * @return    string
         */
        function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype='all')
        {
            global $cfg_cookie_encode;
            $dtp = new DedeTagParse();
            $dtp->SetNameSpace("field","<",">");
            $dtp->LoadSource($fieldset);
            $dede_addonfields = "";
            if(is_array($dtp->CTags))
            {
                foreach($dtp->CTags as $tid=>$ctag)
                {
                    if($loadtype!='autofield'
                    || ($loadtype=='autofield' && $ctag->GetAtt('autofield')==1) )
                    {
                        $dede_addonfields .= ( $dede_addonfields=='' ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type') );
                        echo GetFormItemValueA($ctag,$fieldValues[$ctag->GetName()]);
                    }
                }
            }
            echo "<input type='hidden' name='dede_addonfields' value=\"".$dede_addonfields."\">\r\n";
            echo "<input type=\"hidden\" name=\"dede_fieldshash\" value=\"".md5($dede_addonfields.$cfg_cookie_encode)."\" />";
        }

        2、找到如下几行,删除或者注释掉

        // 这里对前台提交的附加数据进行一次校验
                $fontiterm = PrintAutoFieldsAdd($cInfos['fieldset'],'autofield', FALSE);
                if ($fontiterm != $inadd_f)
                {
                    ShowMsg("提交表单同系统配置不相符,请重新提交!", "-1");
                    exit();
                }

        再次编辑提交就没问题了。

        关键词:DedeCMS
        试看60边摸边吃奶边做
        <samp id="ztxok"><strong id="ztxok"><u id="ztxok"></u></strong></samp>
          <b id="ztxok"><ins id="ztxok"><u id="ztxok"></u></ins></b><progress id="ztxok"></progress>

            1. <samp id="ztxok"><ins id="ztxok"><ruby id="ztxok"></ruby></ins></samp>