5095 Posts in 1518 Topics by 1114 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1047 Views |
-
complex table field strange behavior when checking/unchecking items

5 February 2009 at 11:25am
I have recently been noticing very strange behavior is some of my CTF when checking and unchecking objects in them.
They will only save as checked the items which are changed, and will uncheck any other items, even if they are still checked when saving. So in other words if I had 5 items and the first 3 were checked, in order to get all 5 checked after saving, I would have to uncheck the first 3 and check the last 2!
Thats probably pretty confusing! So here is a couple of examples:
Example 1
Open page:
Item1: Checked
Item2: CheckedChange to:
Item1: Checked
Item2: UnCheckedSave page and reload becomes:
Item1: UnChecked
Item2: CheckedExample 2
Open page:
Item1: Checked
Item2: Checked
Item3: UnChecked
Item4: UnCheckedChange to:
Item1: UnChecked
Item2: UnChecked
Item3: Checked
Item4: CheckedSave page and reload:
Item1: Checked
Item2: Checked
Item3: Checked
Item4: CheckedIts pretty mind boggling before you know whats going on and even then its a real pain, especially if your table is filtered so to only show items accociated with that page, one wrong click and you can lose the whole lot, with the only way to get them back being to edit the database.
I have had this problem with a number of installs both on my local windows env and on my live linux server all using 2.23.
has anyone else seen this behavior?
-
Re: complex table field strange behavior when checking/unchecking items

5 February 2009 at 8:35pm
Yes, I see this behavior sometimes (also with 2.3 RC2). I don't have a solution, really, other than reloading the cms with ?flush=1. That sometimes helps. I posted about this problem earlier as well (and talked about it during IRC chat hours) but that didn't get anywhere either...
-
Re: complex table field strange behavior when checking/unchecking items

5 February 2009 at 11:32pm
Did not bump into this myself, but eeh...
This sounds like a pretty huge issue , no ?
Did you create a ticket ?
-
Re: complex table field strange behavior when checking/unchecking items

5 February 2009 at 11:39pm
Yea it does seem like a pretty major bug, just wanted to check it wasn't just me before I made a ticket
-
Re: complex table field strange behavior when checking/unchecking items

6 February 2009 at 12:52pm Last edited: 6 February 2009 12:53pm
ok thanks to ajshort for pointing me to this ticket with a solution: http://open.silverstripe.com/ticket/2723
Open sapphire/javascript/RelationComplexTableField.js
and move these two declarations at the top of the page:
var checkedListNameArray = null;
var checkedArray = null;to inside the function like this:
RelationComplexTableField = Class.create();
RelationComplexTableField.prototype = {initialize: function() {
var checkedListNameArray = null;
var checkedArray = null;Not sure why they wouldn't have added this to 2.3, but anyway is simple enough change
| 1047 Views | ||
|
Page:
1
|
Go to Top |



