Secondary WP_Query being overriden in archive page

I believe the error lies in

$topic_query['tax_query'] = $topic_tax_query;

which should be

$topic_query_args['tax_query'] = $topic_tax_query;

A simple variable mixup, so your taxonomy query makes it into WP_Query.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)