NXT-List/Forms with FF 4.0: Duplicate Record fails

Any tips and tricks that has to with the ADDT that doesn't fit into one of the other categories
jguert
Posts: 3
Joined: 2011-03-31 14:38

NXT-List/Forms with FF 4.0: Duplicate Record fails

Post by jguert » 2011-03-31 15:00

Hi,

I have encountered a problem in NXT-List/Forms with FF 4.0: Duplicate Record fails.
The "insert as new" button does not work any more. In worst case the changed content will overwritten.

Does anyone have the same effect?

In

Code: Select all

/includes/nxt/scripts/form.js
(lines 334-355) found the function:

Code: Select all

function nxt_form_insertasnew(obj, var_name) {
	var frm = obj.form;
	if (is.ie && frm.action == '') {
		var action = window.location.href
	} else {
		var action = frm.action.toString();
	}
	parts = action.split("?");
	var qs = new QueryString(parts[1]); var new_qs = [];
	var re = new RegExp('^'+var_name, 'g');
	Array_each(qs.keys, function(key, i) {
		if (! key.match(re)) {
			Array_push(new_qs, key+'='+qs.values[i]);
		}
	});
	var new_part = new_qs.join('&');
	action = parts[0];
	if (new_part != '')
		action += '?' + new_part;
	frm.action = action;
	return true;
}
Any Ideas?

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Post by Fred » 2011-04-02 14:24

I don't often use this functionality so I had to hunt for a site where I do use it.

I "edit" a record and "Insert as new" without any problems.
Did you upload the latest patches from the download section?

Do you maybe have some corruption on the files on the server?

jguert
Posts: 3
Joined: 2011-03-31 14:38

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Post by jguert » 2011-04-05 12:47

HI Fred,

it seems to be a problem with Firefox 4.0 for Mac only. On a Windows PC with Firefox 4.0 it works fine.
Perhaps one of the next updates for Firefox 4.x for Mac will fix the problem on this platform.

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Post by Fred » 2011-04-06 12:07

Let us know...
Did you file a report with FF and describe the issues to them?

Hellkeeper
Posts: 15
Joined: 2010-08-31 16:59

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Post by Hellkeeper » 2012-06-26 10:10

Hi,

this happens on new FF versions on MAC too ... anyone managed to get this working?

Andreas

Hellkeeper
Posts: 15
Joined: 2010-08-31 16:59

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Post by Hellkeeper » 2012-06-26 11:11

for now I made a quick'n'dirty fix for this problem (with jQuery):

Original:

Code: Select all

<input type="submit" class="KT_Insert1" name="KT_Insert1" value="<?php echo NXT_getResource("Insert as new_FB"); ?>" onclick="nxt_form_insertasnew(this, 'id_nws');" />
Fixed:

Code: Select all

<input type="submit" class="KT_Insert1" name="KT_Insert1" value="<?php echo NXT_getResource("Insert as new_FB"); ?>" onclick="$('.KT_Update1').remove();nxt_form_insertasnew(this, 'id_nws');" />
Just add a class to every button - and on click remove the other buttons from the DOM ... working! ;-)

Post Reply