After editing a node body, I get the error as attached.
In the log is the following:
Jul 11 05:08:33 webservert drupal: http://final.altior.nl|1342008513|php|192.168.202.1|http://final.altior.nl/verslagen/altior-f3-kampioen|http://final.altior.nl/verslagen|1||Notice: Undefined index: #formatter in edit_preprocess_field() (line 348 of /var/www/final.altior.nl/sites/all/modules/edit/edit.module).
Jul 11 05:08:37 webservert drupal: http://final.altior.nl|1342008517|php|192.168.202.1|http://final.altior.nl/verslagen/altior-f3-kampioen|http://final.altior.nl/verslagen|1||Notice: Undefined index: #formatter in edit_preprocess_field() (line 348 of /var/www/final.altior.nl/sites/all/modules/edit/edit.module).

Hope this helps.
I have the latest dev code

-Ronald

CommentFileSizeAuthor
#5 error2.png18.49 KBresveld
edit error.png22.23 KBresveld

Comments

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Postponed (maintainer needs more info)

Thanks for the bug report!

Any chance you installed the module using Drush? Same error occurred there: #1665612: AJAX errors when installed using Drush, due to a bug in Drush.

Regarding that undefined index notice: I'm not sure how that's possible. I think Field API ensures every field is rendered using a formatter, so it doesn't make sense that it would sometimes not exist. Could you check in which cases (for which fields) this happens?

resveld’s picture

Wim,

I installed it via admin/modules and not via drush.

It's happening for the body of the node.
It's quite easy to reproduce, contact me if you want access.

Ronald

wim leers’s picture

It's *only* happening for the body of the node?

I'm afraid access won't do much good, I need the steps to reproduce this instead, so that I can debug it :) I strongly suspect there is some other module on your site causing this problem. I'd be happy to proven wrong though, and you could prove me wrong by reproducing this on a vanilla Drupal 7 site. Would you be willing to do that?

resveld’s picture

Let me test thoroughly and on plain vanilla d7 (got my own vm :)).
I'll report back soon...

resveld’s picture

StatusFileSize
new18.49 KB

Too fast.
I found which module gives me pain.
It's the metatag module.
Without it it's fine, but with the module it breaks.

I've attached the error to this post.
What do you reccon? Should I post this in the metatag queue?

-Ronald

wim leers’s picture

Title: AJAX error after updating node body » Edit module incompatible with Metatag module
Project: Edit » Metatag
Status: Postponed (maintainer needs more info) » Active

Let's ask the maintainer for 1 minute of his time to see what he suspects might be the culprit.

It might very well be something Edit module is doing wrong.

resveld’s picture

Will you contact him as you are closer to the source?

wim leers’s picture

dave reid’s picture

This is because Metatag injects the renderable meta tag output for entities using hook_field_attach_view_alter() which are not actually fields. Not sure how exactly template_preprocess_field() would be getting called on it.

Using the latest Edit module I'm not able to reproduce the ability to edit body fields at all. So I'm not sure how I can help here.

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Ok I figured it out. I had to change the body field formatter to 'Default' for the teaser view mode. Seems like summary or trimmed isn't supported, which is the default formatter used by core.

I have been unable to reproduce the error message at all. Are other modules like display suite being used on this site too? Can this be reproduce with just Core + Metatag + Edit module?

wim leers’s picture

Title: Edit module incompatible with Metatag module » Edit module incompatible with Metatag module + some unknown factor
Project: Metatag » Edit
Priority: Normal » Minor

Thank you so much, Dave!

Moving back to the Edit issue queue to get feedback from resveld.

Reducing priority because it seems to be an edge case.

resveld’s picture

no display suite is on there.
I just tried a plain vanilla, but it seems like edit doesn't work there.
Gonna put some time in it tonight, thnx!

damienmckenna’s picture

@davereid: please see the patch in #1363476: Panels integration - ensure meta tags work OOTB on entity pages which would replace the use of hook_field_attach_view_alter() with a more normal hook_entity_view().

dave reid’s picture

Yes but that doesn't really explain this issue.

wim leers’s picture

Category: bug » support

Is this still a problem? You seem to have been the only one to report this particular problem…

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of response.