[verb (dictionary form)] + ものではない [verb (potential)] + た + ものではない
ものではない after a dictionary-form verb says an action is not something a person does: "you shouldn't", "one doesn't". It is advice from common sense, the kind an older person gives a younger one, not a rule.
The positive, what you should do, is ものだ: やくそく約束はまもる守るものだ.
After a potential verb with た, ものではない says something is so bad you can't bear it: "not fit to eat", "impossible to watch".
The た is part of the phrase, not a past tense: the food is bad now, and the heat is unbearable today.
In speech ものではない shortens to もんじゃない, and the polite ものではありません to もんじゃありません.