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
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | error2.png | 18.49 KB | resveld |
| edit error.png | 22.23 KB | resveld |
Comments
Comment #1
wim leersThanks 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?
Comment #2
resveld commentedWim,
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
Comment #3
wim leersIt'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?
Comment #4
resveld commentedLet me test thoroughly and on plain vanilla d7 (got my own vm :)).
I'll report back soon...
Comment #5
resveld commentedToo 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
Comment #6
wim leersLet'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.
Comment #7
resveld commentedWill you contact him as you are closer to the source?
Comment #8
wim leersDone: https://twitter.com/wimleers/status/223373178951569408.
Comment #9
dave reidThis 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.
Comment #10
dave reidOk 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?
Comment #11
wim leersThank 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.
Comment #12
resveld commentedno 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!
Comment #13
damienmckenna@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().
Comment #14
dave reidYes but that doesn't really explain this issue.
Comment #15
wim leersIs this still a problem? You seem to have been the only one to report this particular problem…
Comment #16
wim leersClosing due to lack of response.