I know I am not first with this issue, however, nobody earlier got support in this issue, AFAIK.

I have Drupal 7.14 site with all contributed modules actual.

The content of the field Body are empty in edit form, despite they are visible when nodes are displayed. This is for basic pages and all custom content types, for nodes created until May 30th. Newer nodes are OK.

The date may be important as recently I updated some contributed modules.

Comments

VM’s picture

The date may be important as recently I updated some contributed modules.

which modules?

bshaf’s picture

I too have this exact issue. D7.14 just upgraded from 6.26. Body field shows on page but is empty on edit.

thajaphio’s picture

Same problem.

Custom content type with images (unlimited, with title enabled) & body field.
When i create a new node the edit body field shows up fine.
When editing the node the body field is gone.

When viewing the node body text shows.

Installed modules:

ctools
pathauto
token
views

VM’s picture

check the manage display tab, are you sure the field is set properly?

thajaphio’s picture

manage display is fine. And field i showing up fine when viewing the node.
It is when editing the node that the body field is gone (the form element is missing).

It only happens when editing nodes, not when creating new ones.

I havent had that much time to look into it yet, but i will try using devel to see if it's only visual.

thajaphio’s picture

It was one of my own javascripts that messed it up. Everything works fine now.

AndrzejG’s picture

I checked that after pasting content into this empty field for the second time and save, it doesn't disappear.
So, the first "save" seems not to work properly.

AndrzejG’s picture

I have fresh installation, entirely the same except without these huge complex infrastructures for Multilingual options. It is working OK, without error under discussion.

dshields’s picture

I'm experiencing the very same issue.

The content is there, but when i go to /edit or click on the edit tab, there is no content in the body field (this only happens for nodes created before a certain date)

Has anyone found a solution for this yet?

Garmisch’s picture

I am having the same problem as described above in a drupal 7.15 installation. Some of the content types I can edit and in some others nothing shows up. I am not using Organic Groups (seems to cause in some cases this problem).
I've tried to uninstall Content Access without any success.

Someone has a bright idea where to look for?

Patricia_W’s picture

This happened recently, I have a multi-site configuration and several of my sites broke at the same time. I could not edit a page because the body field was blank. (Actually the text appeared briefly in the body field and then the field disappeared although the area it had occupied was still there.)

Eventually I decided to see whether CKEditor was responsible. I tried to disable and then re-enable it ... that did nothing. Eventually, I uninstalled it completely and reinstalled (configured again too.) Now, everything is back to normal. No idea why this would have affected this other than I had recently installed the newest version of the CKEditor module ( 7.11). (I also have the CKEditor code in the Libraries folder so this may have been involved.)

Patricia W

xeniak’s picture

For me it's nodes imported with Feeds that have this problem. Also, if I type anything in the seemingly blank body edit field and save, what I enter overrides the existing body text.

EDIT:
In my case, it turned out that one of my custom modules was causing the body field to be imported with language 'und'. Once I changed it to 'en', the body text re-appeared in the edit form.

teslina’s picture

I've had also the same problem with nodes imported by Feeds. Here's a quick sql query you can run in order to fix this problem. Simply change 'en' / 'de' to the language codes you are using on your site:

For english nodes:

UPDATE  `drupal_field_data_body`
SET `language` = 'en'
WHERE `language` LIKE 'und'
AND `entity_id` IN (SELECT `nid` FROM `drupal_node` WHERE `language` LIKE 'en');

German nodes:

UPDATE  `drupal_field_data_body`
SET `language` = 'de'
WHERE `language` LIKE 'und'
AND `entity_id` IN (SELECT `nid` FROM `drupal_node` WHERE `language` LIKE 'de')

After you've executed the queries, you need to FLUSH the cache - and the body will be displayed again in edit mode.

The same problem may also occur for other fields (images and other custom fields). Those you also need to update manually:

UPDATE  `drupal_field_data_field_blog_image`
SET `language` = 'de'
WHERE `language` LIKE 'und'
AND `entity_id` IN (SELECT `nid` FROM `drupal_node` WHERE `language` LIKE 'de');

UPDATE  `drupal_field_data_field_blog_image`
SET `language` = 'en'
WHERE `language` LIKE 'und'
AND `entity_id` IN (SELECT `nid` FROM `drupal_node` WHERE `language` LIKE 'en');
Sakhmed’s picture

Thank you! This worked for me!

Eric At NRD’s picture

Thank you @teslina!

If your Drupal installation does not have table prefixes, you will not need the leading "drupal_" in your table names. For example, on the site I ran into this on, the queries looked like:

UPDATE  `field_data_body`
SET `language` = 'en'
WHERE `language` LIKE 'und'
AND `entity_id` IN (SELECT `nid` FROM `node` WHERE `language` LIKE 'en');
web226’s picture

Your solution worked for me. The error occurred after i installed the Automatic Entity Labels module. Thanks!

tarasiadis’s picture

This work for me too. All content have to set lang.

Sirisha’s picture

Hi,

Content in body field empty when i edit the node, but it is visible when node is displayed. My website is a multi-language site, we are managing 8 languages. We are also using ckeditor and i have done install and reinstall. still no use. when i print the array, it is showing 'und' array for some body fields, for some of them it is showing that particular language array. For example, if it is English, it is showing 'en' array, instead of 'und'. But for any of the page in my website, it is not showing the content when i edit the body. Can someone please help me to sort out this issue asap.

Thanks,

kikecastillo’s picture

I had the same issue. It happened exactly during the installation of Answers module and it seems totally related with Wysiwyg module. I solved setting language to 'fr' instead of 'und' for all my field_data_body elements. As I used only French on my site, it was easy but it can be done for other all the existing languages taking them from node table. It is important to do it before there is duplicated languages and after doing it, it is important to clean the Drupal cache.

Good luck!

petednz’s picture

Turned out that the issue that caused our Body field both in View and Edit mode to suddently show as blank was language related.

Body field had been set to translatable (before we inherited the site), but there was only 'en' as a language.

We then pulled in a feature that updated the body field (field_config table) so translatable was set to 0

GAH - took ages to figure. There is nowhere in the ui that showed that the field had been set to translatable on the old live site.

Hope it gives someone else some clues

peter davis : fuzion : connect.campaign.communicate : www.fuzion.co.nz

rtackett’s picture

The previous sql update statements did not work for me since I had several revisions for each node and the imported nodes had language='und' or 'en'. When I ran the sql statements, I received an integrity constraint error.

Using /u/petednz fix resolved the issue of the body field being blank on edit.

db_update('field_config')
    ->fields(array('translatable' => 0))
    ->condition('field_name', 'body')
    ->condition('translatable', 1)
    ->execute();
tinker’s picture

Thanks @naptown,

Your solution worked properly for me on a multilingual migrated from D6 to D7.
Also had to clear all caches before changes became visible.

cgfx’s picture

I'm having a suddenly similar issue (probably related to one of the updates that have come down the pipe; pretty annoying!) 

How do you implement either of these fixes? Via drush?