Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 6 years ago

#3418 closed defect (bug) (fixed)

Issues with importing/converting blogroll from 2.0.5

Reported by: viper007bond's profile Viper007Bond Owned by:
Milestone: Priority: high
Severity: normal Version: 2.1
Component: General Keywords:
Focuses: Cc:


Just upgraded my live blog from 2.0.5 to latest SVN (r4578) and had some issues with blogroll categories.

Everything appears to have been imported just fine (no missing data), however the links were put into some additional categories. All of the links are there and are filed in their original categories, but they are also filed in some of my existing post categories. There doesn't seem to be a pattern as these additional categories were picked, but I may be missing it.

And I'm not going to even bother to speculate what's up -- I'll leave that to someone more in the know with the new blogroll code (I'm not up to date on it yet).

Can provide details as needed.

Attachments (1)

cats.png (54.4 KB) - added by Viper007Bond 17 years ago.
After upgrade, before fixing manually

Download all attachments as: .zip

Change History (14)

#1 @Viper007Bond
17 years ago

  • Cc trac@… added

#2 @Viper007Bond
17 years ago

  • Cc wptrac@… added; trac@… removed

17 years ago

After upgrade, before fixing manually

#3 @ryan
17 years ago

upgrade_210() in upgrade-functions.php is the responsible code if someone wants to give it a look.

#4 @BrianLayman
17 years ago

I'm a little concerned about the merging code in this area...

Ok, so basicaly, because of the code in admin-db.category_exists, the first category wins. However, since no "order by" clause is specified in that query, we aren't going to know for sure which the "first" category is going to be. At least that's how it would work in a relational DB. The order of the results would be dependant upon the order in which the data was inserted and when it was modified last. So the order could be by ID or it could be by when the user inserted it or if they did a restore it could be the order by which the restore inserted the records.

Additionally, the Category_exists function doesn't cast the stuff to a specific case when checking for an existing name. So we could end up with WordPress and Wordpress categories (as an example) because of how the blogger first typed them in in Posts vs links. I don't know if that's a design choice, or design oversight. Either way could be argued for I suppose, but there are no comments in the code indicating whether this issue was considered.

#5 @BrianLayman
17 years ago

nm on uppercase/lowercase thing. I see sanitize_title actually converts to lowercase. But I do think an

ORDER BY category_parent , cat_ID

could be added.

#6 @ryan
17 years ago

I cleaned up the upgrade code a bit and ran some test upgrades with a mix of links and cats. Worked for me. Anyone have a 2.0 DB I can test with?

#7 @foolswisdom
17 years ago

  • Milestone changed from 2.1 to 2.1.1

#8 @Nazgul
17 years ago

  • Milestone changed from 2.1.1 to 2.1.2

#9 @foolswisdom
17 years ago

  • Milestone changed from 2.1.3 to 2.2

#10 @foolswisdom
17 years ago

  • Milestone changed from 2.2 to 2.3

#11 @mattyrob
17 years ago

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

I think this may have been fixed by this similar ticket:

#12 @Nazgul
17 years ago

  • Milestone 2.3 deleted

This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.

6 years ago

Note: See TracTickets for help on using tickets.