Joeri Theelen
unread,Jul 26, 2010, 4:17:10 AM7/26/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to arkdev
I believe I found a nasty bug in file "ark/js/sf_submit.js". Lines
239-248:
//we need to correctly set the qtypes
if (pair.indexOf('_qtype') > 0 ) {
split_qtype = pair.split("_");
if (array_key_exists(split_qtype[0],url_array)) {
url_array[pair] = 'add';
add_update_db = 1;
} else {
url_array[pair] = 'skp';
}
};
You should not use the split("_") method because, when the first part
of the qtype-string contains an underscore, the "key" taken from the
pair string is wrong and won't be found in the list of keys of the
array. In my case: fnd_material_qtype was split into "fnd" +
"material_qtype" and not "fnd_material" + "qtype". Because of this,
submitting a dropdown list is never recorded.
Change it into something like this:
//we need to correctly set the qtypes
var index_of_qtype = pair.indexOf('_qtype');
if (index_of_qtype > 0 ) {
var first_part = pair.substring(0, index_of_qtype);
if (array_key_exists(first_part,url_array)) {
url_array[pair] = 'add';
add_update_db = 1;
} else {
url_array[pair] = 'skp';
}
};