Database error on column tt.order breaks category pages

[ad_1]

Our multisite network is showing a database error which causes category archive pages to show empty results and the default uncategorized category to show post results from 1 subsite on all other subsites, including the root subsite.

Not quite sure how this happened and it is only happening on our production environment. When I copy the subsite to our DEV environment it brings the problem along with the subsite when copying the DB tables over.

PHP message: WordPress database error Unknown column 'tt.order' in 'order clause' for query
SELECT DISTINCT t.term_id
FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tt.taxonomy IN ('post_format') AND tr.object_id IN (1355)
ORDER BY tt.order ASC
made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/twentytwentyone/archive.php'), get_template_part, locate_template, load_template, require('/themes/twentytwentyone/template-parts/content/content-excerpt.php'), post_class, get_post_class, get_post_format, get_the_terms, wp_get_object_terms, get_terms, WP_Term_Query->query, WP_Term_Query->get_termsPHP message: WordPress database error Unknown column 'tt.order' in 'order clause' for query
SELECT DISTINCT t.term_id
FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tt.taxonomy IN ('category') AND tr.object_id IN (1355)
ORDER BY tt.order ASC
made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/twentytwentyone/archive.php'), get_template_part, locate_template, load_template, require('/themes/twentytwentyone/template-parts/content/content-excerpt.php'), post_class, get_post_class, get_the_terms, wp_get_object_terms, get_terms, WP_Term_Query->query, WP_Term_Query->get_termsPHP message: WordPress database error Unknown column 'tt.order' in 'order clause' for query
SELECT DISTINCT t.term_id
FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tt.taxonomy IN ('post_tag') AND tr.object_id IN (1355)
ORDER BY tt.order ASC
made by require('wp-blog-h

Looking for ideas on where to look or how to resolve this DB error?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer