Index: src/wp-includes/query.php
===================================================================
--- src/wp-includes/query.php	(revision 26862)
+++ src/wp-includes/query.php	(working copy)
@@ -3264,7 +3264,11 @@
 
 		if ( $this->is_category || $this->is_tag || $this->is_tax ) {
 			if ( $this->is_category ) {
-				$term = get_term( $this->get( 'cat' ), 'category' );
+				if ( $this->get( 'cat' ) ) {
+					$term = get_term( $this->get( 'cat' ), 'category' );
+				} elseif ( $this->get( 'category_name' ) ) {
+					$term = get_term_by( 'slug', $this->get( 'category_name' ), 'category' );
+				}
 			} elseif ( $this->is_tag ) {
 				$term = get_term( $this->get( 'tag_id' ), 'post_tag' );
 			} else {
Index: tests/phpunit/tests/query/taxQuery.php
===================================================================
--- tests/phpunit/tests/query/taxQuery.php	(revision 26862)
+++ tests/phpunit/tests/query/taxQuery.php	(working copy)
@@ -17,6 +17,7 @@
 	protected $post_id;
 
 	protected $cat;
+	protected $uncat;
 	protected $tag;
 	protected $tax;
 
@@ -48,6 +49,9 @@
 		_make_cat_compat( $this->cat );
 		$this->tag = get_term( $this->tag_id, 'post_tag' );
 
+		$this->uncat = get_term_by( 'slug', 'uncategorized', 'category' );
+		_make_cat_compat( $this->uncat );
+
 		add_action( 'pre_get_posts', array( $this, 'pre_get_posts_tax_category_tax_query' ) );
 	}
 
@@ -106,6 +110,29 @@
 		$this->assertEquals( get_queried_object(), $this->cat );
 	}
 
+	function test_cat_uncat_action_tax() {
+		// category with tax added
+		add_action( 'pre_get_posts', array( $this, '_cat_uncat_action_tax' ), 11 );
+
+		$this->go_to( home_url( "/category/uncategorized/" ) );
+		$this->assertQueryTrue( 'is_category', 'is_archive' );
+		$this->assertNotEmpty( get_query_var( 'cat' ) );
+		$this->assertNotEmpty( get_query_var( 'tax_query' ) );
+		$this->assertNotEmpty( get_query_var( 'taxonomy' ) );
+		$this->assertNotEmpty( get_query_var( 'term_id' ) );
+		$this->assertEquals( get_queried_object(), $this->uncat );
+
+		remove_action( 'pre_get_posts', array( $this, '_cat_uncat_action_tax' ), 11 );
+	}
+
+	function _cat_uncat_action_tax( &$query ) {
+		$this->assertTrue( $query->is_category() );
+		$this->assertTrue( $query->is_archive() );
+		$this->assertNotEmpty( $query->get( 'category_name' ) );
+		$this->assertNotEmpty( $query->get( 'tax_query' ) );
+		$this->assertEquals( $query->get_queried_object(), $this->uncat );
+	}
+
 	function test_tax_query_tag_action_tax() {
 		// tax + tag with tax added
 		$this->go_to( home_url( "/testtax/tax-slug2/?tag_id=$this->tag_id" ) );
