﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
21265	settings_fields() conflict with admin-ajax.php in ajax requests	vdvtt		"I created a plugin, which uses the function 'settings_fields()' to generate required fields. When I save the plugin options, I decided to use Ajax Requests to save time.

Until 3.3.2 this was working well, but with 3.4.1 admin-ajax.php code update generates a errors. Because ""settings_fields()"" generate hidden field called ""action"" and before 3.4.1 admin-ajax.php used $_GET['action'] to call ajax action dynamically.

'''How reproduce:'''
1. Use WP 3.4.1
2. Put this code snippet in a .php file in wp root folder: 
{{{
<?php
	require 'wp-load.php';
	
	add_action('wp_ajax_mysettings_save' , 'mysettings_save');
	
	function mysettings_save() {
		//DO SOMETHING USEFULL HERE
		exit('It worked!');
	}

?>
<script src=""http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js""></script>
<form>
	<p><input type=""text"" name=""my_settings_field"" value=""""></p>
	<button>Save</button>
	<?php settings_fields('my_settings'); ?>
</form>
<script>
	$('form').submit(function(event){
		event.preventDefault();
		
		$.post('wp-admin/admin-ajax.php?action=mysettings_save', $(this).serialize(), function(data){ console.log(data); });
	});
</script>
}}}


In wordpress 3.4.1 field 'action' changes to 'update', because $_REQUEST['action']. In wordpress 3.3.2, field 'action' is 'mysettings_save'.

I have to redo all my work with my plugin with this change in Wordpress 3.4.1. "	defect (bug)	new	normal	Awaiting Review	Plugins	3.4.1	normal			
