Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Anonymous (not verified)
Created:
27 Jul 2010 at 16:26 UTC
Updated:
9 Mar 2022 at 12:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
furamag commentedThis is bug in includes/form.inc file. We should fix function theme_form_element_label. We need to replace
to
Comment #2
yched commentedPushing to form component. There's not much we can do at the Field API level.
Comment #3
yched commented@furamag: that fix sounds correct. Care to roll a patch ?
Comment #4
yched commentedOops, posted in the middle of changing the title
Comment #5
ygerasimov commentedI would change the condition to
(empty($element['#title']) && ($element['#title'] != 0) && empty($element['#required']))as if somehow NULL value will come it also should be excluded.
Please review the patch.
What is worrying me more is rendering the field afterwards. Looks like drupal_render() not rendering properly
array('#markup' => 0). Please recheck setting the value of the field to zero and look at node view page.Comment #6
ygerasimov commentedchanging status to 'needs review'
Comment #7
furamag commentedTested for Drupal7-Beta1. It works fine for latest version of Drupal 7. I manually changed includes/form.inc to fix this bug. But we need to change something in this patch to apply it automatically for Drupal7-Beta1.
Comment #8
marcingy commentedBumping to d8
Comment #9
marcingy commented#6: 866292-5.patch queued for re-testing.
Comment #11
marcingy commentedJust a re-roll of patch that was rtbc.
Comment #12
attiks commentedI added a test to check if the label is rendered, be warned this is my first test for core
Comment #13
attiks commentedRTBC, because my patch only added a test, original patch is working
Comment #14
aspilicious commentedYou can't mark your own patch rtbc. It would be better if we had a test only patch so we could see it is failing.
(I don't say something is wrong with your patch)
Comment #15
attiks commented@aspilicious you're right, but since patch + test is small, I'll just change the status.
Can you mark it as RTBC, if it's checks out?
Comment #16
aspilicious commentedIf you upload a test only patch I can rtbc it.
Comment #17
marcingy commentedThere are some issues with the patch as is. There are missing periods at the end of comments lines
And we also add a new radio button
Which isn't used in the tests and also has the wrong name.
Comment #18
marcingy commentedComment #19
marcingy commentedReroll of #12 to fix above and add a test for the radio as checkbox. Also the test should be checking for a t('0') as this is the case of the problem. First patch should fail and second should pass.
Comment #20
attiks commented@marcingy thanks you're absolutely right, if think I didn't had enough coffee this morning, patch applies cleanly and does what it's supposed todo, so I guess RTBC
Comment #21
sunThe added condition somehow conflicts with the first, ultimately very hard to understand. Use the following subcondition instead:
20 days to next Drupal core point release.
Comment #22
marcingy commentedReroll taking into account #21
Comment #23
attiks commentedLooks better and is indeed more readable
Comment #24
quicksketchThis cropped up in the Webform queue today: #1363788: Zero integers not exported in CSV/Exel downloads..
Reroll for the core directory move.
Comment #25
sunThanks!
Comment #26
catchLooks good to me. Committed/pushed to 8.x. Moving to 7.x.
Comment #27
quicksketchReroll for D7. Exact patch, no changes needed other than removing the /core directory.
Comment #28
ygerasimov commentedRerolled patch to 7.x
Comment #29
quicksketchHaha, well I'm guessing that I can RTBC @ygerasimov's #28. :)
Solved the problem in Webform that I was experiencing. It's a little bit weird that we're bothering to translate "0", but since this was already committed to D8 and we don't translate tests anyway, I don't think there's any need to hold this up.
Comment #30
webchickOh, silly PHP. :P
Committed and pushed to 7.x. Thanks!
Comment #32
cweagansUpdating tags per http://drupal.org/node/1517250