您在這裡

cck filefield的錯誤訊息

lok's 的頭像
lok 在 2011-01-15 (週六) 23:51 發表

我站用到CCK filefield(5.X時為imagefield)和ImageCache,並設定了Default image。
即是使用者沒上載圖檔時,就顯示預設圖片。可是,若使用者不上傳圖檔,發表文章後便出現以下訊息:

user warning: Column 'field__6_fid' cannot be null query: INSERT INTO xxxx_content_type_story (vid, nid, field__6_fid, field__6_list, field__6_data) VALUES (2425, 2425, NULL, NULL, NULL) in /home/xxxxxx/domains/mysite.com/public_html/modules/cck/content.module on line 1213.

這訊息沒影響到文章的發佈,預設圖也如常顯示,不過就礙眼極了。

另外,我又發現,一旦我在發表文章前刪除上傳圖檔(例如想換另一張),便出現以下錯誤:

# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') FROM xxxx_content_field__4 WHERE = 236' at line 1 query: SELECT count() FROM xxxx_content_field__4 WHERE = 236 in /home/xxxxxx/domains/mysite.com/public_html/modules/filefield/filefield.module on line 1018.
# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 236' at line 1 query: SELECT nid, vid FROM xxxx_content_field__4 WHERE = 236 in /home/xxxxxx/domains/mysite.com/public_html/modules/filefield/filefield.module on line 1059.

各位知道是什麼原因造成嗎?有什麼方法解決呢?非常感謝