2013-04-25 23 views
0

在節點編輯頁面的文件附件下,單擊附加時出現以下錯誤: 驗證錯誤,請重試。如果此錯誤仍然存​​在,請與網站管理員聯繫爲什麼我會收到驗證錯誤?

+0

這是很難用很少的信息來調試這個問題。請編輯並添加更多信息...是否有自定義模塊更改節點表單,任何特殊模塊,模板編輯表格等。 – 2013-04-25 17:28:11

+0

這種情況發生在尚未更改的表單上,例如故事表單/節點/添加/故事 – AllisonC 2013-04-25 17:43:45

+0

它來自上傳模塊 – AllisonC 2013-04-25 17:50:31

回答

0

更多的方便解決辦法,或許是:我禁用了足夠長的JavaScript以執行我的文件上載,然後重新打開它。

對於在那裏我遇到了這個錯誤的模塊路徑遞歸的grep表現在以下路徑此錯誤消息的安裝:

modules/upload/upload.module 
includes/form.inc 
sites/all/modules/ctools/includes/form.inc 
sites/all/modules/views/includes/form.inc 

我在文件上傳之中遇到的錯誤,並快速看看upload.module顯示的錯誤來自一個叫做upload_js()的函數。因此,我在瀏覽器中禁用了JavaScript並上傳了我的文件,然後重新啓用了JavaScript。

在此之前,我確保我的用戶擁有上傳此文件的特權和足夠的配額,碰到max_file_uploads設置並重新啓動php5-fpm/apache

的抱怨代碼如下所示:

// Load the form from the Form API cache. 
    if (!($cached_form = form_get_cache($_POST['form_build_id'], $cached_form_state)) || !isset($cached_form['#node']) || !isset($cached_form['attachments'])) { 
    form_set_error('form_token', t('Validation error, please try again. If this error persists, please contact the site administrator.')); 
    $output = theme('status_messages'); 
    print drupal_to_js(array('status' => TRUE, 'data' => $output)); 
    exit(); 
    } 
相關問題