Bug #20994
closeddb_list doesn't show '0' values
0%
Description
Values '0' aren't shown in db_list, neither if given by Sring nor by Int.
Furthermore Single-View saves '0' as Int but all fields are shown with value '0' even if there is no entry in database.
TypeHandling has to be included because some tables need explicit '0'-Values and controlling the entries is impossible with current behavior.
(issue imported from #M11875)
Files
Updated by Rupert Germann about 15 years ago
I don't get the point yet - could you explain this further? steps to reproduce.....
Updated by David Bruchmann about 15 years ago
Hy Rupert,
when you have saved a Value '0' in the Database db_list doesn't show it.
You can work with that '0' in extensions or you can show it in Frontend but
you can't control it by db_list in Backend.
In Listview db_list shows nothing and in singleview all empty integerfields show '0' too, so it's impossible to distinguish the saved one from the others.
I remarked that by building a static table where '0' is just a value for an option (http://en.wikipedia.org/wiki/ISO_5218). And having '0' is not the same as nothing.
Best Regards
David
Updated by Rupert Germann about 15 years ago
ok, now i got: if you save a content element with title (header) = 0 (the number zero)
the list module will show [no title], the page module will simply show nothing
but what is the metioned "singleview"? do you talk about the editform?
Updated by David Bruchmann about 15 years ago
Yes, I meant the editform.
Sorry, could have called it 'editform' ;-)
Updated by Oliver Hader about 15 years ago
David, could you please attach a screenshot? Thus everyone can be sure, that we talk about the same... Thanks! ;)
Updated by David Bruchmann about 15 years ago
Sure,
have a look at db_list_faults.jpg above.
Best Regards
David
Updated by David Bruchmann about 15 years ago
Hy Bastian,
The Patch helped for db_list but not for the editform with eval=int in TCA
I have installed it on version 4.2.8 some where some lines of the class look a bit different as in your patch but I don't think that this makes a difference.
I added another Screenshot to explain the problem.
Best Regards
David
Updated by David Bruchmann about 15 years ago
Hy Bastian,
Regrettable I remarked that the file lang/locallang_common.xml doesn't exist in V4.2.8 is it perhaps for 4.3 only?
Best Regards
David
I took the file from 4.3 that fixed another Bug with missing Icons in Dropdownboxes too - FINE!
Updated by David Bruchmann about 15 years ago
The Patch works and fixes the required changes - +1 by Testing.
The mentioned misbehavior in editform is a configuration-item in TCA and can be fixed by setting click=>'' instead of click=>'0' upon 'config'.
Example:
TCA['TABLENAME'] = Array(
'columns' => array(
'FIELDNAME' => array(
'config' => array (
'type' => 'input',
'size' => '2',
'max' => '1',
'eval' => 'int',
'checkbox' => '', ##### << Here it is, the solution
'range' => array (
'upper' => '9',
'lower' => '0'
),
'default' => 0
),
....