Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7529 closed defect (bug) (fixed)

Bug in textpattern import

Reported by: jhernandis's profile jhernandis Owned by: westi's profile westi
Milestone: 2.6.2 Priority: normal
Severity: normal Version: 2.6.1
Component: Administration Keywords: textpattern import has-patch
Focuses: Cc:

Description

In "textpattern.php" in wp-admin/import, at the line 332, shows like this:

				$cats = array();
				$category1 = get_category_by_slug($Category1);
				$category1 = $category1->term_id;
				$category2 = get_category_by_slug($Category2);
				$category2 = $category1->term_id;
				if($cat1 = $category1) { $cats[1] = $cat1; }
				if($cat2 = $category2) { $cats[2] = $cat2; }

There is a bug that makes the categories was not assigned correctly. The right code is that:

				$cats = array();
				$category1 = get_category_by_slug($Category1);
				$category1 = $category1->term_id;
				$category2 = get_category_by_slug($Category2);
				$category2 = $category2->term_id;
				if($cat1 = $category1) { $cats[0] = $cat1; }
				if($cat2 = $category2) { $cats[1] = $cat2; }

Attachments (1)

textpattern.diff (541 bytes) - added by mrmist 16 years ago.
diff containing suggested change to textpattern.php

Download all attachments as: .zip

Change History (6)

@mrmist
16 years ago

diff containing suggested change to textpattern.php

#1 @mrmist
16 years ago

  • Keywords has-patch added

#2 @westi
16 years ago

  • Milestone changed from 2.6.1 to 2.6.2
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

#3 @westi
16 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [8658]) Fix typo in textpattern importer. Fixes #7529 for trunk.

#4 @westi
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 2.6.x branch

#5 @westi
16 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [8659]) Fix typo in textpattern importer. Fixes #7529 for 2.6 branch props jhernandis.

Note: See TracTickets for help on using tickets.