Inline editing of the title field doesnt work when activating the following modules:

-entity_translation
-title

and replacing the node title with a title_field.

You can edit the field inline, but the cahnges aren´t saved.

Comments

nod_’s picture

I totally expected this one to come up. So close. I was going to look at it this week-end :)

kingfisher64’s picture

I'm just delighted to hear that this is being addressed for d7.
Will be very handy to have it work with the title mod.

Good stuff nod_ :)

nuez’s picture

Hi nod_

Thought I´d give you a hand. I´m sure you could figure out a cleaner solution, but here´s what I did:

The problem is that what the TITLE module calles 'legacy fields' should be updated as well.

Let´s say the original language of a entity is spanish, but the entity could be translated to english as well.
If you save the $entity->title_field['en'] values nothing happens, but when you save the $entity->title_field['es'] values, the $entity->title value gets saved as well.

I looked into the title_field_attach_submit function to see what it does, and took some essentials from it to add to the 'edit' module. See patch.

I´ve noticed that the edit module executes the field_attach_submit function, so the title hook should be taken into account...

nuez’s picture

Some trailing whitespace fixes

wim leers’s picture

Title: Edit doesnt work with title module » Compatibility with Title module (necessary for i18n)
Category: bug » feature
Status: Active » Postponed (maintainer needs more info)

Wow. Talk about massive edge cases for valid use cases :)

However, I don't understand yet why we essentially need to duplicate part of the Title module's code here (i.e. of title_field_attach_submit()). Edit calls field_attach_submit(), which should call title_field_attach_submit(), which means that … in theory, it all should be working just fine without these hacks?

Also, this is not a bug, it's a feature request, and possibly one of major priority.

wim leers’s picture

Title: Compatibility with Title module (necessary for i18n) » Add support for Title module (necessary for i18n)
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Postponed
Issue tags: +Spark

From #2168725: [META] Add support for in-place editing entity types other than Node:

To get a 1.0 stable release of Edit out the door, a scope has been determined:

  • support for in-place editing nodes
  • support for using Edit in combination with Panels pages to do page layouts

Otherwise, Edit would probably be in a perpetual beta, in order to test against all entity types in Drupal 7. Drupal 7's Entity API was a contrib afterthought, not part of Drupal core, hence there are lots of subtle problems — Edit has helped consolidate Entity API in Drupal 8.

Thank you for your understanding.

wim leers’s picture

Project: Edit » Quick Edit