Skip to:
Content

bbPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 months ago

#2710 closed defect (bug) (fixed)

Add Tag descriptions to bbPress1 importer

Reported by: thebrandonallen's profile thebrandonallen Owned by: netweb's profile netweb
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.4
Component: API - Importers Keywords: has-patch
Cc:

Description

With WP_DEBUG on, the bbPress1 importer fails at converter.php #L1031, because the description is never set in bbPress1.php.

Looking at the other importers, this could be a larger issue, but I've only patched for bbPress1. This is for two reasons, 1) I don't have data to test other importers, and 2) since term descriptions are possible in bbPress 1, we should be attempting to import them anyway.

Attachments (2)

2710.01.patch (764 bytes) - added by thebrandonallen 10 years ago.
2710.2.diff (829 bytes) - added by netweb 10 years ago.

Download all attachments as: .zip

Change History (7)

#1 @netweb
10 years ago

Thanks, not sure how I missed term descriptions for bbPress 1 in r5176 but either way we should include them.

Secondly I can't reproduce any error relating to both this specifically or any error relating to importing with WP_DEBUG enabled, I snuck in a quick import of bbPress 1 befoe my power was turned off this morning and I had no issues importing from bbPress1.php.

Were you importing from a bbPress 1.1/1.2 install or 0.9 (there are issues with 0.9 and earliear) or was it a BuddyPress legacy forums import?

#2 @netweb
10 years ago

  • Component changed from General to Importers
  • Milestone changed from Awaiting Review to 2.6

@netweb
10 years ago

#3 @netweb
10 years ago

Now that I have electricity again... Taking a look at this, if I add the patch "as is" then this breaks the import from bbPress v.1.2x (Database version 2471)

WordPress database error: [Unknown column 'terms.description' in 'field list']

SELECT 
convert(term_relationships.object_id USING "utf8") AS object_id,
convert(term_taxonomy.term_taxonomy_id USING "utf8") AS term_taxonomy_id,
convert(terms.name USING "utf8") AS name,
convert(terms.slug USING "utf8") AS slug,
convert(terms.description USING "utf8") AS description 
FROM bb_term_relationships AS term_relationships 
INNER JOIN bb_term_taxonomy AS term_taxonomy USING (term_taxonomy_id) 
INNER JOIN bb_terms AS terms USING (term_id) 
LIMIT 0, 100

The only tax/term table with a fieldname description is bb_term_taxonomy so changing the patch to what is in 2710.2.diff works for me and the resultant SQL query is:

SELECT 
convert(term_relationships.object_id USING "utf8") AS object_id,
convert(term_taxonomy.term_taxonomy_id USING "utf8") AS term_taxonomy_id,
convert(terms.name USING "utf8") AS name,
convert(terms.slug USING "utf8") AS slug,
convert(term_taxonomy.description USING "utf8") AS description 
FROM bb_term_relationships AS term_relationships 
INNER JOIN bb_term_taxonomy AS term_taxonomy USING (term_taxonomy_id) 
INNER JOIN bb_terms AS terms USING (term_id) 
LIMIT 0, 100

Note 1: Working out the joins and how they should be interpreted in the converter is pretty crazy, I could have also joined using the same expressions in your original patch, all the SQL expressions and JOIN expressions of each section (forum, topic, reply, topic tag, user) are all merged and combined, I am working on making this clearer and updating this to facilitate more joins as this is holding back two importers vBulletin5 and WP Symposium from being included in bbPress at the moment.

Note 2: If you are unaware you can debug the importer queries by viewing the page source, e.g. Google Chrome, right click, inspect element, and you will see each of the MySQL queries used during the import.

This ticket was mentioned in Slack in #bbpress by netweb. View the logs.


10 years ago

#5 @netweb
10 years ago

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

In 5569:

Include topic-tag descriptions in bbPress 1.x importer

  • Props thebrandonallen for initial patch
  • Fixes #2710
Note: See TracTickets for help on using tickets.