Since the update the functionality to show the label instead of the value of a boolean field is not working anymore.

This unlike my other bug this one is completely reproducible.

  1. Install a new drupal instance
  2. Install i18n
  3. Setup another language (german in my case)
  4. create a content type with a boolean field
  5. Inside the field set the option "Use field label instead of the "On value" as label"
  6. When adding content for this content type the label of the field will show either empty or with the value of the field for the edition form

If you drush dl i18n-7.x-1.8 and overrite, do a drush cc all and voila,
the label is now shown instead of nothing/the value of the field. Below two images with my testbool field.

Comments

jose reyero’s picture

Priority: Normal » Critical
jose reyero’s picture

Status: Active » Closed (duplicate)

Looking better, this should be already fixed in latest dev, see #2061401: Use field label instead of the "On value" as label not working after update from 1.8

Sk8erPeter’s picture

Status: Closed (duplicate) » Active
StatusFileSize
new125.18 KB

I just switched to 1.10 from 1.9, because I had the same problem. The anomaly has really been fixed on the EDIT FORMS (see before, with 1.9: http://i.imgur.com/R5No8hw.png, and after, with 1.10: http://i.imgur.com/MSMcAzl.png), BUT when viewing the result, the '#markup' key is empty, which results in an empty field. Here is an example with the default 1 (On) and 0 (Off) values:

i18n 1.10 boolean field label fixed but markup is empty when viewing the content

Is it related to i18n updates? I tried it with two Drupals, with more themes, and I experienced the same anomaly when viewing the content. It may be related to other contrib modules too (in this case, I'm sorry for reopening the issue), but I would be grateful if you could check whether it can be caused by i18n. Thanks in advance!

reptilex’s picture

Status: Active » Fixed

It is now corrected in 1.10.

Sk8erPeter’s picture

It is now corrected in 1.10.

Have you tested it? :)
Because no, this is not fixed - BUT as I found out, this is not related to i18n, it's related to the core.

This is a screenshot of a brand new Drupal 7.23 standard install, with Bartik enabled, one simple content type, values set to default, "Use field label instead of the "On value" as label" checked; "1" should appear (as a string), but no value gets printed:

asd

Drupal 7.23 new, boolean field, single on-off checkbox, values set to default, 'Use field label instead of the On value as label', no values output when viewing the node

EDIT tab

===================================================================

EDIT - Related topic in Drupal core's issue queue

There's already an open topic in the core's issue queue here: #1750950: Boolean fields are invisible if no 'On/Off value' is set.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

english correction