Hi,
I have the following error when try to view a node:
Notice: Undefined index: body in locale_field_fallback_view() (line 71 of modules\locale\locale.field.inc).
I have:

  1. Enabled locale.
  2. Added a language (it).
  3. Enabled the URL content language negotation.
  4. Enabled the Multilingual support for the page content type.
  5. Setted to hidden the full node display format for the body
  6. Created a page with language en

Comments

peximo’s picture

StatusFileSize
new854 bytes

The problem is in locale_field_fallback_view() which only checks if a field is empty, not if it is set.

plach’s picture

Status: Active » Needs review

let's test this

plach’s picture

Status: Needs review » Needs work

The patch looks good, but multilingual field tests need to be updated.

peximo’s picture

Status: Needs work » Needs review
StatusFileSize
new3.87 KB

Added some test.

plach’s picture

Status: Needs review » Needs work

Also the new test looks good. A couple of minor issues:

+++ modules/locale/locale.test	20 Oct 2009 17:19:15 -0000
@@ -1691,6 +1690,40 @@ class LocaleMultilingualFieldsFunctional
+  /*
+   * Test if body field with hidden display is correctly not showed on node 
+   * view.
+   */

Better: "Test if the body field does not appear on node view when the "hidden" display is set for the "full" build mode."

+++ modules/locale/locale.test	20 Oct 2009 17:19:15 -0000
@@ -1691,6 +1690,40 @@ class LocaleMultilingualFieldsFunctional
+    // @todo: test if body full type is hidden

Should be "Test if the body display is actually "hidden" for the "full" build mode.". We might want to actually implement this before commit.

This review is powered by Dreditor.

peximo’s picture

Status: Needs work » Needs review
StatusFileSize
new4.25 KB

Added last test for body full type display and fix the comments.

peximo’s picture

StatusFileSize
new4.18 KB

Fix a comment.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -translatable fields

Automatically closed -- issue fixed for 2 weeks with no activity.