My guess is the problem is with the jack itself. It incorporates a spring-steel contact which is either 'open' or 'closed' according to whether the jack-plug is inserted or not.
This in turn opens and closes the speaker circuit.
This contact may have become dislodged or bent so that it no longer works as it should.
This in turn opens and closes the speaker circuit.
This contact may have become dislodged or bent so that it no longer works as it should.