Hi,
Add this to your wp_config.php to see what’s going wrong:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
If refactoring to a network-activated plugin isn’t viable, you can bypass get_the_terms() and use a direct database query to grab terms from blog 2’s tables.
global $wpdb;
$blog_prefix = $wpdb->get_blog_prefix(2);
$terms = $wpdb->get_results( $wpdb->prepare(
“
SELECT t., tt.
FROM {$blog_prefix}terms AS t
INNER JOIN {$blog_prefix}term_taxonomy AS tt ON t.term_id = tt.term_id
INNER JOIN {$blog_prefix}term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tr.object_id = %d AND tt.taxonomy = %s
“,
$article_id,
‘etiquettes’
) );