Shortcodes in excerpts returning empty string

If you’re using auto-generated excerpts, then all shortcodes will be removed (https://developer.wordpress.org/reference/functions/the_excerpt/):

An auto-generated excerpt will also have all shortcodes and tags
removed. It is trimmed down to a word-boundary and the default length
is 55 words. For languages in which words are (or can be) described
with single characters (ie. East-Asian languages) the word-boundary is
actually the character.

And it makes sense – you don’t want any advanced HTML in these excerpts and you have no control over what output will a shortcode generate (it may be something basic, but it may be a lot of complicated HTML code…)

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