Page 1 of 1

Bug in Version 2.0

PostPosted: Mon Nov 12, 2012 1:18 am
by muzafar
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.

Re: Bug in Version 2.0

PostPosted: Mon Nov 12, 2012 2:23 am
by simb
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.

Re: Bug in Version 2.0

PostPosted: Mon Nov 12, 2012 3:06 am
by muzafar
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.

Re: Bug in Version 2.0

PostPosted: Tue Nov 13, 2012 9:36 am
by shannah
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