#2668 closed enhancement (fixed)
Importers: Include Subscribed Forums, Subscribed Topics and Favourite Topics
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | API - Importers | Keywords: | |
Cc: | doug@… |
Description
In doing a large bbPress 1.x conversion I noticed that user's favorites were not converted and that there is currently no code in the converters to do so. Is this something that should be included? I know at least in this case it's very important to the users.
Change History (21)
#1
@
9 years ago
- Milestone changed from Awaiting Review to Future Release
- Type changed from defect to enhancement
#2
follow-up:
↓ 4
@
9 years ago
I have my WordPress and bbPress 1.2 integrated so my users IDs don't change on import. I see that the importer stores a "_bbp_old_topic_id" meta_key in postmeta to map old and new post IDs. That's not too bad in my case for looking up and building a new favorites meta for bbPress 2.
Is there anything saved that maps the old user id to the new one that could be used when users are imported? If so, would the favorites conversion be better to do using those things in its own pass after everything else is done?
#4
in reply to:
↑ 2
@
9 years ago
Replying to douglsmith:
I have my WordPress and bbPress 1.2 integrated so my users IDs don't change on import. I see that the importer stores a "_bbp_old_topic_id" meta_key in postmeta to map old and new post IDs. That's not too bad in my case for looking up and building a new favorites meta for bbPress 2.
Yes _bbp_old_topic_id
should be able to remap the old bb_favorites
topics to the new wp__bbp_favorites
topics.
Is there anything saved that maps the old user id to the new one that could be used when users are imported? If so, would the favorites conversion be better to do using those things in its own pass after everything else is done?
I have a pretty big update for all of bbPress importers and the main converter.php
file that I will be adding in the next day or so. Primarily the changes ensure that we have an 'old' forum, topic, reply, user ID's so we can do exactly the type of thing you are looking to do here.
In fact, if you have already have performed an import and look at the wp_usermeta
table you will see an entry for _bbp_user_id
and this is in fact is the old user ID, the updates will rename that field to _bbp_old_user_id
and update the logic in converter.php
I'll post an update to this ticket after I upload the changes and you can take a look and we can go from there.
#5
@
9 years ago
- Milestone changed from Future Release to 2.6
Moving to 2.6, will add a patch and commit next week.
Related #2716
#16
@
8 years ago
- Resolution set to fixed
- Status changed from new to closed
- Summary changed from Importing from bbPress 1.x does not import favorites to Importers: Include Subscribed Forums, Subscribed Topics and Favourite Topics
Pretty sure this is all done now, marking as fixed.
Sounds reasonable enough and I've wanted to look at this for sometime so I just took a quick look.
Adding the following to the users section of
bbPress1.php
nearly does the trick, the issue is because we import the users before topics we do not yet have the new topic ID.(I tried adding similar code to the topics section to get around the above but the way favorites are stored in the
bb_usermeta
table we cannot map a key field to based on each topic id as they are imported.)The goal with the following would be to then after the topics are imported to go through each
_bbp_old_favorites_id
field and create a new meta field inwp_usermeta.wp__bbp_favorites
with each user id and new topic id.This however all falls over if you are only importing BuddyPress Group Forums to upgrade to bbPress 2.x forums as there is no need to import the users, so in a bbPress 1.x to 2.x import this will kind of work.
Then when I look to add something similar for some of other importers it gets bad pretty quickly.
I'm going to put this ticket in 'Future Release' for now until some fresh ideas arise.