Solution 1:

The 't' used to be pronounced, but then was lost, but the pronunciation with a 't' is slowly coming back (because of the spelling).

Dictionaries will provide the 't' pronunciation as a variant. Note that 'soften' is always pronounced without the 't' currently.

Solution 2:

The true answer to this question is perhaps best explained by The Ballad of Shameless Enjambment, a cautionary tale here reproduced by kind permission of its author:

From far and wide, they’ve come to list-
        en, watch, and judge her plea.
Beneath the lights her skin aglist-
        en drips and drabbles free.
Before she speaks she stops to moist-
        en lips all cracked and dry;
Refreshed for now, she lifts her voice
        and pleading asks them, “Why?”
She tells them just how much, how oft-
        en all well-spoken men
That certain t’s they oft would soft-
        en up, and how and when.
This once a trait of working class
        infects its rulers too,
Who know no better than to fast-
        en t’s where once taboo.
The scholars gasp, that she should chast-
        en men of such renown.
They rise as one and move to hast-
        en towards her dressing down.
But wait! she cries, there’s more to this
        and other matters yet.
Too late! they rage, and quick she’s christ-
        ened fraudulent coquette.

Solution 3:

The pronunciation with the 't' is a hypercorrection. Although the 't' was long ago pronounced, it has been silent for centuries and is only recently making a comeback because people assume that not pronouncing the 't' is erroneous. It makes sense that it would be silent, by analogy to similar words that lose their 't' sound when -(e)n is added ('soft'/'soften', 'list'/'listen', 'fast'/'fasten', 'haste'/'hasten', and of course, 'oft'/'often').

Solution 4:

Majoring in languages and linguistics in college, I had one linguistics professor who was exceptionally adamant that often should not be pronounced with the t. That was a spelling pronunciation that had begun in the first quarter of the 20th century when greater access to schooling and literacy became available to children and adults. Often should be pronounced to rhyme with soften, this professor taught, as the two words had come through the language to modern times sharing the same etymological history — and we don’t pronounce the t in soften.