Bug in Version 2.0
Archived from the Xataface Users forum.
muzafar — Mon Nov 12, 2012 1:18 am
Dear Shannah,
we have upgraded our xataface library to 2.0 alpha, but we are facing few issues.
1 - in Related table, the status field doesn’t show when we try to access from it’s related table. when we come directly from the URL, then it show the status. there is no such issue in old version of xataface.
2 - the second issue is in Multiselect, When we try to insert mulitselect values from valuelist, it is inserting in database with the comma separated format like this (1,2,3,4,5) instead of (1
2
3
).
3 - We have an issue in customization of field, for instance: I want to show the field (status) in bold with color red, it doesn’t render the status in list with the format which i mentioned in fields.ini.
Kindly lead me.
simb — Mon Nov 12, 2012 2:23 am
I can confirm this.
The “Status” filed shows only when the DB field is changed from “status” (varchar) to any thing else but status e.g. “Stat” and it shows fine
Any pointer will be highly appreciated.
muzafar — Mon Nov 12, 2012 3:06 am
The problem is not in the status field, it’s on any field.
I have downloaded the xataface 2.0 from http://sourceforge.net/.
I have created two tables:
CREATE TABLE IF NOT EXISTS province (
province\_id int(11) NOT NULL AUTO_INCREMENT,
name varchar(22) NOT NULL,
PRIMARY KEY (province\_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
INSERT INTO province (id, name) VALUES
(1, ‘Test’);
CREATE TABLE IF NOT EXISTS district (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(64) NOT NULL,
province\_id int(11) NOT NULL,
status varchar(256) NOT NULL,
PRIMARY KEY (id),
KEY province\_id (province\_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
–
– Dumping data for table district
–
INSERT INTO district (id, name, province\_id, status) VALUES
(1, ‘Muzafar Shah’, 1, ‘Nothing yet’),
(5, ‘Muzafar Shah’, 1, ‘Nothing yet just to test’);
–
– Constraints for dumped tables
–
–
– Constraints for table district
–
ALTER TABLE district
ADD CONSTRAINT district\_ibfk\_1 FOREIGN KEY (province\_id) REFERENCES province (province\_id);
Now after insertion in list:
if i come directly from the table district, then it shows all the fields in list, but if i come from the parent table, “province”, then it doesn’t show the district.name field. please see the attached snapshot, you will understand what i mean.
in province table relationships.ini:
[district]
district.province_id = “$province_id”
action:label = District
action:visible = 1
I have not yet configured the fields.ini.
kindly lead me.
shannah — Tue Nov 13, 2012 9:36 am
The province_id problem is an optimization. Since the province id field is supposed to be the same as the parent table id, it is hidden by default. I.e. if you’re viewing the relationship through the province table, then every district in the relationship will have the same province anyways, so the default is to not show it. Currently I don’t think there is a way to override this, other than to add a grafted field onto the related table that has the same data but a different name.
For the multi-select problem, you can specify the separator for the field in the fields.ini file section for the field via the “separator” directive. e.g.
- Code: Select all
[myfield] separator="\n"
-Steve