Posted by jiddisch on October 4, 2012 at 12:00pm
After upgrading drupal-6 to drupal-7, I cannot see the body content of a specific content type on his edit page.
after a little research I found out that the column "language" in the "field_data_body" table is set to "und" instead of "en",
so I created a "view" with a VBO field (I need to use VBO because I want to add some filter), and added "execute arbitrary php" operation,
but I dont know how to replace the "und" to "en",
Can someone tell me how to do it?
(Sorry for bad English and thanks!)
Edited: I found the proper code:
db_query("UPDATE field_data_body SET language = REPLACE(language, 'und', 'en') WHERE entity_id = $entity->nid");
Comments
Same problem happened when I
Same problem happened when I imported content with Feeds module. The "language" in "field_data_body" and other custom fields were incorrectly set to "und". The result is that content appears correctly on the website but not in the edit screens, fields are empty. I corrected the value manually in the database but I can't imagine doing that for all my 1600 nodes.
Is there another way to change set the language per field besides VBO?
Thanks