5098 Posts in 1518 Topics by 1115 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1233 Views |
-
BUG : removeFieldFromTab needs to be _AFTER_ addFieldToTab()

28 January 2009 at 5:56am
Hi,
It seems that in 2.3 , a strict order has to be followed within getCMSFields(). This worked in 2.2 and is very upgrade-unfriendly.
Can anyone please confirm that this is indeed a bug and happens for them as well ? If so , I'll create a new ticket for it.
;-)
This works :
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new ImageField('Screenshot'), 'Content');$fields->removeFieldFromTab("Root.Content.Main","Thumbnail");
$fields->removeFieldFromTab("Root.Content.Main","Summary");
$fields->removeFieldFromTab("Root.Content.Main","Content");return $fields;
}while this does not :
function getCMSFields() {
$fields = parent::getCMSFields();$fields->removeFieldFromTab("Root.Content.Main","Thumbnail");
$fields->removeFieldFromTab("Root.Content.Main","Summary");
$fields->removeFieldFromTab("Root.Content.Main","Content");$fields->addFieldToTab('Root.Content.Main', new ImageField('Screenshot'), 'Content');
return $fields;
} -
Re: BUG : removeFieldFromTab needs to be _AFTER_ addFieldToTab()

28 January 2009 at 7:33am
Hi Fuzz10,
couldn't this just be because you're removing 'Content' first while you're adding one 'before Content' after that?
Is the bug there as well as you leave out 'Content' in your addFieldToTab?
-
Re: BUG : removeFieldFromTab needs to be _AFTER_ addFieldToTab()

28 January 2009 at 9:58am
ohww..daamn... I'm blind...
;)
I cannot try right now ... But I bet that is it... haha..
Thanks !
| 1233 Views | ||
|
Page:
1
|
Go to Top |


