Ticket #1403 (closed enhancement: fixed)
Make addFieldToTab() ignore duplicates
| Reported by: | freeyland | Assigned to: | sminnee |
|---|---|---|---|
| Type: | enhancement | Priority: | blocker |
| Milestone: | 2.2.3* | Component: | Sapphire Framework |
| Version: | Severity: | medium effort / impact | |
| Keywords: | Cc: | ischommer, sminnee | |
| Due date: | Hours: |
Description (last modified by sminnee) (diff)
In order to support multiple roles including the same field - e.g., Country - addFieldToTab() should ignore requests to add a field that already exists in the field, if the field is a data field.
Country in E-commerce and forum module for member
've installed silverstripe.2.1.DailyBuild?.2007-08-01 and I get following error when clicking to edit a user account in the security admin part:
ERROR:Error 256: collateDataFields() I noticed that a field called 'Country' appears twice. At l28 in C:\xampp\htdocs\projects\AJAX\silverstripe-v2.0\sapphire\forms\FieldSet?.php user_error(collateDataFields() I noticed that a field called 'Country' appears twice.,256) line 28 of FieldSet?.php FieldSet?->collateDataFields(Array) line 17 of FieldSet?.php FieldSet?->dataFields() line 421 of Form.php Form->loadDataFrom(Member) line 176 of MemberTableField?.php MemberTableField?->DetailForm?() line of call_user_func_array(Array,Array) line 376 of ViewableData?.php ViewableData?->XML_val(DetailForm?1) line 19 of .cacheC..xampp.htdocs.projects.AJAX.silverstripe-v2.0.sapphire.templates.ComplexTableField?_popup.ss include(C:\WINDOWS\Temp\silverstripe-cache\.cacheC..xampp.htdocs.projects.AJAX.silverstripe-v2.0.sapphire.templates.ComplexTableField?_popup.ss) line 190 of SSViewer.php SSViewer->process(MemberTableField?) line 720 of ViewableData?.php ViewableData?->renderWith(ComplexTableField?_popup) line 349 of ComplexTableField?.php ComplexTableField?->edit() line 523 of Form.php Form->callfieldmethod(Array,Form) line 134 of Controller.php Controller->run(Array) line 48 of Director.php Director::direct(/admin/security/index/1) line 101 of main.php
I removed the forum module and now the problem is solved. SO probably there is a conflict between e-commerce and forum module. I checked in the member table and now 1 of the two country columns is removed.
