开发者

TinyMCE Filemanager - Plugin

NOTE: ORIGINAL PROBLEM WAS FIXED, but there's still some issues using the plugin on rails 3.0.3 with ruby 1.8.7, the maintainers have been notified of this. Thanks for everyone's help.

Hi All, I am using the plugin located at https://github.com/galdomedia/tinymce_filemanager and i have followed the instructions, and the editor does load.

However I am getting the following error when trying to insert an image and use the file browser.

Unknown action

The action 'tinymce_filemanager' could not be found for PagesController

Is this something someone has come across before?

In my controller for pages I have included the following before my methods

include TinymceFilemanager

which is what it said in the instructions.

BTW I am using rails 3.0.3 and ruby 1.9.2

Any help would be greatly appreciated.

Cheers, Matenia

2nd January 2010 - Update

I have worked out how to avoid this error ... comment out the

# match ':controller(/:action(/:id(.:format)))'

this is due to tinymce_filemanager declaring it's routes after the initial application routes have been loaded and it is trying to match the controller and actions on the above line instead of moving forward.

Now I have a new issue:

NoMethodError in PagesController#tinymce_filemanager_upload_image

undefined method `type' for #<ActionDispatch::Http::UploadedFile:0x00000101ac45e8>

it's saying that the error is in vendor/plugins/tinymce_filemanager/lib/galdomedia/tinymce_filemanager.rb:249:in upload_base' vendor/plugins/tinymce_filemanager/lib/galdomedia/tinymce_filemanager.rb:123:intinymce_filemanager_upload_image'

which is (method on line 123)

def tinymce_filemanager_upload_image
  upload_base(images_folder, "tinymce_filemanager/list_images", accept_image_mime, image_size_limit)
end

and method on line 249

see: https://github.com/galdomedia/tinymce_filemanager/blob/rails3/lib/galdomedia/tinymce_filemanage开发者_如何学Gor.rb#L243

it seems to not find file.type ... hhhmmm .... going to also try cloning another repo that seems to be using this plugin in a CMS to see where I have gone wrong.

Thank you so far to the stackoverflow community.

Cheers, Matenia


For Rails 3 it looks like the include module is include Galdomedia::TinymceFilemanager, not include TinymceFilemanager, are you using the rails3 branch?

See comments below

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜