spree-contrib / spree_editor

Rich text editor for Spree with Image and File uploading in-place.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
112 stars 183 forks source link

Preferences not saved #17

Closed greinacker closed 12 years ago

greinacker commented 12 years ago

There's something wacky with the way the preferences are working on 1.0.0. For example -

  1. Make sure assets are precompiled
  2. I go into the editor preferences and change the "Rich Editor Identificators" to be just "page_body" (e.g. removing product_description)
  3. Test, everything seems ok
  4. Run rake assets:clean
  5. Go to admin product page, note that tinyMCE is still loading for product description

I fixed temporarily by just changing the preference default to be only "page_body", which works as expected.

Not sure exactly what's going on - I didn't have time just now to dig in further, but I thought I'd at least post an issue here in case someone else wanted to take a look!

ipd commented 12 years ago

My preferences aren't being saved at all in 1.0.0.

I can check the 'enabled' checkbox. I can add page_body to the ids text input field.
I hit submit, the page reloads, and the preferences have not been updated.

ipd commented 12 years ago

Another, but probably related, issue is that in my Spree i'm not getting any default values assigned when calling Spree::EditorConfiguration.new

In the rails console:

>> s = Spree::EditorConfiguration.new
=> #<Spree::EditorConfiguration:0xd676d14>
>> s[:ids]
>> nil

So in _rich_editor_javascript.html.erb the values are all nil and the editor never shows up.

joeyjoejoejr commented 12 years ago

If you are having the same problem I am having this is solved on the Spree 1.0-Stable branch. It's a problem with how boolean preferences were saved.

greinacker commented 12 years ago

This seems to be working ok now for me on 1.0.3 - closing the issue.