[TYPO3-v4] Git/Gerrit workflow, commit messages

Helmut Hummel helmut.hummel at typo3.org
Sun Mar 20 19:26:09 CET 2011


Hi,

On 16.03.11 10:15, Ernesto Baschny [cron IT] wrote:

>> Maybe I (we) must get used to it...

> Important is that the person who submits the bug fix to gerrit makes
> sure to UPDATE the issue description to make it clear what the bug is
> (and steps to reproduce, etc). So that the reviewer doesn't need to read
> through the whole discussion but can concentrate on the issue
> description (which replaces the information that we used to have in our
> RFC mails).

Looking at the latest commit message in master:

========================
Description
Problem:
I want to use the new TCA tree, but when I configure 1 as maxitems I
can't select a tree node.

This happens, because this.countSelectedNodes in
t3lib\js\extjs\tree\tree.js is 1 even when I create a new record.
And this.countSelectedNodes is 1 because $valueArray in
t3lib\tceforms\class.t3lib_tceforms_tree.php in the function
renderField always has at least one entry.

$valueArray is created by exploding $PA['itemFormElValue']. In fresh
records $PA['itemFormElValue'] is 0 and not NULL (or not set) and
has no other effects. But $valueArray has an entry and that's why
count($valueArray) is 1 and then this.countSelectedNodes is also 1.

To reproduce this issue you can use this TCA (Thanks to Steffen:
http://lists.typo3.org/pipermail/typo3-team-core/2010-November/044931.html):
$GLOBALS['TCA']['pages']['columns']['fe_group']['config']
['renderMode'] = 'tree';
$GLOBALS['TCA']['pages']['columns']['fe_group']['config']['maxitems'] = 1;
$GLOBALS['TCA']['pages']['columns']['fe_group']['config']['treeConfig']
= array(
     'parentField' => 'subgroup',
     'appearance' => array(
         'expandAll' => TRUE,
         'showHeader' => TRUE,
     )
);

Solution:
To fix this issue $PA['itemFormElValue'] should be only exploded if it's
not 0. Like I wrote before, this is done in
t3lib\tceforms\class.t3lib_tceforms_tree.php and fixed in the appended
patch.

Fixing this issue causes a little follow up in t3lib\js\extjs\tree\tree.js.
This is also fixed in the patch.
==============================


Is this a commit message style we're aiming for?
I personally do not like such lengthy commit message, but would not mind
if everyone agrees this is the way to go.

But I'm still not sure if this is the case.

Kind regards,
Helmut

-- 
Helmut Hummel
TYPO3 Security Team Leader

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-v4 mailing list