#2710 closed defect (bug) (fixed)
Add Tag descriptions to bbPress1 importer
Reported by: | thebrandonallen | Owned by: | 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)
Change History (7)
#2
@
10 years ago
- Component changed from General to Importers
- Milestone changed from Awaiting Review to 2.6
#3
@
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.
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?