Teaser gets populated with body value when editing.

Comments

wim leers’s picture

By "teaser", you mean "summary"?

This is a limitation of the way we're currently doing things.

  1. We can only sync back/save/store modifications by the user through forms.
  2. We want to be able to edit textual fields (such as the body field) "directly" (i.e. with contentEditable).
  3. When we load the form for the body field, there's a "summary" form item (by default; the user can configure it to not have a summary). We keep this form hidden.
  4. Upon saving the "directly" edited textual field, its value simply gets set on every input[type=text] in the hidden form, then submit it.
  5. Resulting in summary == body text.

There are two ways around this:

  1. Don't allow text to be "directly" edited when the summary stuff is enabled, this will cause the form to be shown, and thus the "summary" stuff to be editable by the user.
  2. Prevent every input[type=text] to get the value, but only the right one.
nod_’s picture

Status: Active » Fixed

That was really helpful, thanks!

Went with a variation of 2: if the input name has summary in it, don't select it. Teasers can't be inline edited right now so it shouldn't be to much of an issue. Would be great to select only the right one but that harder to do :)

http://drupalcode.org/project/edit.git/commitdiff/0eeaeb75e1d547e9c6cdc8...

wim leers’s picture

#2: HAHAHAHA! Now THAT is hacky!

nod_’s picture

wim leers’s picture

#4: eh… you just linked to this very issue? :P

nod_’s picture

Woops #1895142: Metatags + Edit module prevents save of body field but I was able to solve it better so no big deal.

webchick’s picture

Issue tags: +Edit D7 Backport

Automatically closed -- issue fixed for 2 weeks with no activity.