Ticket #7529 (closed defect (bug): fixed)
Bug in textpattern import
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6.2 |
| Component: | Administration | Version: | 2.6.1 |
| Severity: | normal | Keywords: | textpattern import has-patch |
| 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
Change History
-
attachment
textpattern.diff
added
- Owner changed from anonymous to westi
- Status changed from new to assigned
- Milestone changed from 2.6.1 to 2.6.2
- Status changed from assigned to closed
- Resolution set to fixed
- Status changed from closed to reopened
- Resolution fixed deleted
Reopen for 2.6.x branch
Note: See
TracTickets for help on using
tickets.

diff containing suggested change to textpattern.php