#16 new
TomJoyal

Plugin Configuration Not Working

Reported by TomJoyal | January 15th, 2010 @ 08:56 AM

I am having a problem passing configuration information for plugins, and I believe I have isolated the problem.

My "plugins" configuration contains:

plugins: insertdatetime

The configuration for it is supposed to be:

plugin_insertdate_dateFormat : %m/%d/%Y

I believe the problem is occurring in OptionValidator.valid? The statement:

@@valid_options.include?(option) ||
  (plugins && plugins.include?(option.split('_')[0])) ||
  option =~ /^theme_advanced_container_\w+$/

The value passed in "option" is "plugin_insertdate_dateFormat", so the [0] index of the split is returning "plugin", which does NOT exist in the plugins array. Unfortunately, even if this were changed to grab the [1] index entry, it still would not work since "insertdatetime" did not create its configuration entry as "plugin_insertdatetime_???"

The only solution I can see (easily) would be to add the plugin configuration parms to valid_tinymce_options.yml but I honestly do not see how that would be maintainable. Otherwise, just blanket accept any configuration that starts with "plugin_"

Hopefully, you can see a better way to handle this standard plugin specifically, and this problem in general. THANKS!

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A Ruby on Rails plugin that allows easy implementation of the TinyMCE editor into your applications.

People watching this ticket

Pages