<label id="kdrfs"><p id="kdrfs"><pre id="kdrfs"></pre></p></label>
  • <meter id="kdrfs"></meter>
    <meter id="kdrfs"></meter>

    <cite id="kdrfs"></cite>

    1. <menu id="kdrfs"><s id="kdrfs"><pre id="kdrfs"></pre></s></menu>
    2. <meter id="kdrfs"><font id="kdrfs"></font></meter>

      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
      世界杯买球网址