Problem/Motivation

When using a plain text field and inputting a string value of "0", the table does not render the value in the display. Instead it renders empty <td> </td> tags.

Steps to reproduce

  1. Create a new datafield field
  2. Create a new plain text field / column in the datafield field
  3. Enter the value of "0" in the input field when editing the entity
  4. View the entity

Comments

chrisck created an issue. See original summary.

chrisck’s picture

Issue summary: View changes

  • lazzyvn committed 9632f415 on 2.x
    Issue #3506883: Plain text field not showing value when value is 0
    
lazzyvn’s picture

Status: Active » Fixed
chrisck’s picture

StatusFileSize
new13.41 KB

@lazzyvn I don't think this issue is fixed. I've just tested this on the latest 2.0.9 release that has your latest commit in it.

eca issue plain text zero not showing

lazzyvn’s picture

Clear cache maybe?
tested on my drupal it works finezeo fill
view zero fill

chrisck’s picture

Clearing cache did not fix it. However, going to Manage display and changing the Format from Table to something else, and then back to Table fixed it. I think it required a saving of the Manage display.

Edit: This is definitely a bug and seems to happen when an entity reference field is included, and the display is set to Label (term name), rather the the term ID. See steps to reproduce below.

lazzyvn’s picture

you didn't read the module instructions step 3?

chrisck’s picture

Please follow these steps to reproduce:

  1. Create taxonomy vocabulary Alphabet
  2. Create three taxonomy terms in Alphabet: "A", "B", "C"
  3. Add a new data field to Basic page content type
  4. Leave the first data row as machine name value with Type: Text (plain)
  5. Add another data row as machine name alphabet with Type: Entity reference
  6. Configure Alphabet data row Entity reference type: Taxonomy term and Vocabulary: Alphabet
  7. Save settings
  8. Create new Basic page with "0" value in plain text and select a taxonomy term for Alphabet
  9. By default, "0" value will display in plain text, but the taxonomy term will show the term ID
  10. Go to Manage display for Basic page and click on the "cog wheel" to open up field formatter settings for Table, change nothing and "Update" field formatter Table
  11. Save the Manage display page
  12. View your Basic page and see the "0" value is missing, but now the taxonomy term name is showing.
lazzyvn’s picture

you didn't read the module instructions step 4? It must config field settings, widget, formatter before use. If you can't, you can hire an drupal expert who can find the error in your case and send a patch to fix.

chrisck’s picture

I have read all instructions included with the module and have set the field widget and field display. I'm reporting a bug. If you follow steps to reproduce you will see.

  • lazzyvn committed 8c93c844 on 2.x
    Issue #3506883 by lazzyvn: Plain text field not showing value when value...
lazzyvn’s picture

You can change annother formatter type it wil show 0. btw it fixed in dev version for default string formatter

chrisck’s picture

@lazzyvn Tested the latest release 2.0.10 and this is fixed, thank you!

Status: Fixed » Closed (fixed)

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