5121 Posts in 1527 Topics by 1119 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2021 Views |
-
$fields->addFieldToTab not working ver 2.3 RC3

1 February 2009 at 4:05am
Hi,
Well custom Fields is not working for me in 2.3 rc2 and RC3 but working just fine in ver 2.2.3
I wanted to know if I am doing somthing wrong or there is a bug.
The database all get created when we do db flush etc but in the admin end
all I see is the empty tab with no field.
Also RemoveTab is working fine.Here is my code sniped.
My whole work has come to stop cause of this.
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.SidebarText', new HtmlEditorField('SidebarText'), 'SidebarText');
$fields->addFieldToTab("Root.Content.SidebarText", new ImageField('Image1'),'content');
$fields->addFieldToTab("Root.Content.SidebarText", new ImageField('Image2'),'content');
$fields->addFieldToTab("Root.Content.SidebarText", new ImageField('Image3'),'content');
$fields->addFieldToTab('Root.Content.SidebarText', new HtmlEditorField('SidebarTextBottom'), 'SidebarTextBottom');
return $fields;
} -
Re: $fields->addFieldToTab not working ver 2.3 RC3

1 February 2009 at 5:34am
Hi,
Do you have a 'content' field in the SidebarText tab?
You're doing:
$fields->addFieldToTab("Root.Content.SidebarText", new ImageField('Image1'),'content');
Which would only make sense if you want to add it before the 'content' field (note it's really 'Content').
If you don't have a content field in that tab, try with leaving out 'content'.It might be a bug or possibly 2.3 RC3 has become a bit stricter and doesn't allow this kind of error anymore.
-
Re: $fields->addFieldToTab not working ver 2.3 RC3

1 February 2009 at 7:08am
Thanks dio5
2.3 RC3 has become stricter
The solution was to simply remove content and keep it empty.
Finally all set and ready to start working.
| 2021 Views | ||
|
Page:
1
|
Go to Top |


