Bug in Version 2.0

A place for users and developers of the Xataface to discuss and receive support.

Bug in Version 2.0

Postby 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.
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm

Re: Bug in Version 2.0

Postby 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.
simb
 
Posts: 4
Joined: Wed Oct 24, 2012 10:07 am

Re: Bug in Version 2.0

Postby 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.
Attachments
through-parent-table-province.png
Through parent table
through-parent-table-province.png (74.39 KiB) Viewed 6792 times
direct-from-url.png
Direct From table District
direct-from-url.png (55.22 KiB) Viewed 6792 times
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm

Re: Bug in Version 2.0

Postby 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
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 6 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved