0

我将ckeditor gem从升级4.2.44.3.0现在上传文件不起作用。我选择一个图像,单击“发送到服务器”,然后只显示消息的 javascript 警报undefined。没有控制台消息或错误,在我的终端中我只得到以下日志:

"POST /pictures HTTP/1.1" 200 - 0.6002

什么可能导致这个问题?我正在使用ruby 2.5.3rails 5.2.0

在此处输入图像描述

在 ckeditor 使用 Balloonpanel.css 和 balloontoolbal.css 加载月色皮肤之前,我确实遇到了内部服务器错误,但这不应该导致问题。

4

1 回答 1

0

我有同样的问题。ckeditor/application_controller 中的 AssetResponse 似乎没有填充模型属性。asset.save 验证失败,因为属性为空白。这就是我在 byebug 中得到的内容。

   10:   def respond_with_asset(asset)
   11:     asset_response = Ckeditor::AssetResponse.new(asset, request)
   12: 
=> 13:     if asset.save
   14:       render asset_response.success(config.relative_url_root)
   15:     else
   16:       render asset_response.errors
   17:     end
(byebug) asset
#<Ckeditor::Picture id: nil, attachable_id: nil, attachable_type: nil, asset_type: "image", description: nil, sort_by: "", visible: false, data_file_name: nil, data_content_type: nil, data_file_size: nil, deleted_at: nil, created_at: nil, updated_at: nil, row_order: nil, data_fingerprint: nil>
(byebug) 
于 2019-01-09T18:25:27.937 回答