He used to shorten Maghrib prayer when travelling, out of ignorance. Does he have to repeat those prayers?
Question

A man used to shorten his prayers when travelling, and he even used to shorten Maghrib prayer. Now that he has come to know that Maghrib prayer cannot be shortened, he is confused regarding what he should do about the Maghrib prayers that he shortened. Should he repeat the Maghrib prayers only, as now he does not know how many times he travelled?
Praise be to Allah.Maghrib prayer cannot be shortened when travelling, according to the consensus of the Muslims. Al-Nawawi (may Allah have mercy on him) said:
It is permissible to shorten Zuhr, ‘Asr and ‘Isha’ when travelling, but it is not permissible to shorten Fajr or Maghrib, and it is not permissible to shorten prayers when not travelling. There is scholarly consensus on all of that."(Al-Majmu‘  4/322).
If someone used to shorten Maghrib when travelling out of ignorance, he must repent from having fallen short in learning what is required of him, but does he have to repeat the prayers he offered?
There are two views concerning that among the scholars:
The first view is that he does not have to repeat the prayers, as he is excused because of his ignorance.
The second view is that he must make up the Maghrib prayers that he shortened, because they are not valid. This was the view of a number of jurists. If he does not know the number of prayers, he should pray as many as he thinks most likely to be required to absolve himself.
The view that is more likely to be correct regarding that is that the one who was ignorant is not required to repeat his prayers, as is proven in the Sunnah in many instances. This is the view favoured by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him).
Please see the answers to question no. 45648 .
If you make up these prayers, by way of erring on the side of caution and so as to avoid differing with the scholars who said that it is obligatory to make them up, that is a good idea and is more likely to absolve you of responsibility.
And Allah knows best.