tsechingho / ckeditor-rails

Integrate CKEditor javascript library with Rails asset pipeline
https://github.com/tsechingho/ckeditor-rails
MIT License
214 stars 133 forks source link

unable to load ckeditor due to exportpdf #95

Closed blshkv closed 2 years ago

blshkv commented 2 years ago

Hello,

I have upgraded to the latest 4.16.0 and facing this problem. In ruby console:

ActionController::RoutingError (No route matches [GET] "/assets/ckeditor/plugins/exportpdf/lang/en.js"):

In browser's console:

:3000/assets/ckeditor/plugins/exportpdf/lang/en.js?t=L7C8:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ckeditor.self-f7ca4ae77c110b39e6e915bcc2783acff6e8594ba9ca711c5553503a3a57cfb1.js?body=1:22 [CKEDITOR] Error code: exportpdf-no-token-url.

ruby config:

Ckeditor::Rails.configure do |config|
  # default is nil for all languages, or set as %w[en zh]
  config.assets_languages = nil

  # default is nil for all plugins,
  # or set as white list: %w[image link liststyle table tabletools]
  # or set as black list: config.default_plugins - %w[about a11yhelp]
  config.assets_plugins = nil

  # default is nil for all skins, or set as %w[moono-lisa]
  config.assets_skins = nil
end

may be https://github.com/tsechingho/ckeditor-rails/issues/94 related

tsechingho commented 2 years ago

The exportpdf could be removed, please see #94 .

I do not see assets routing error of yours in my test rails application (4.2.11.3 / 5.2.6 / 6.1.4.1). Any further related information is welcome.

We do have asset routing error issue, and it will be resolved by using sprockets postprocessor in next release.

blshkv commented 2 years ago

ok, thanks, I can see that it is possible to explicitly disable that plugin. The strange thing is that all plugins are disabled in my assets, but it doesn't work for 2 of us at least.

Let me know what else I could provide for you to reproduce the issue

tsechingho commented 2 years ago

v4.16.1 is released and readme is updated. Please take a try if it could resolve your assets routing error issue.

ps. Rails test apps are available too if you like to try in local mac machine via git clone.

blshkv commented 2 years ago

ok, great. The issue is fixed without any additional changes to my existing configuration.

Thanks! Appreciate it.

blshkv commented 2 years ago

FYI, there is still a little warning in the console:

ckeditor.self-f7ca4ae77c110b39e6e915bcc2783acff6e8594ba9ca711c5553503a3a57cfb1.js?body=1:22 [CKEDITOR] Error code: exportpdf-no-token-url.

The suggested solution fixed it: CKEDITOR.config.removePlugins = 'exportpdf';