If I understand this correctly, the mage is probably dead
And that's not necessarily a bad thing. But we'll get to that in a moment.
By "clothing portal" I assume you mean that the volume encompassed by the clothing is transported. Mages therefore require hoods or hats lest their heads be left behind. Clothing must drag on the floor and cover hands lest useful appendages be left behind.
If this is not the case, please clarify the rules of your magic.
Case 1: Mage is fully encased in a wall
The wall is thicker than the volume encompassed by the mage's clothes and for the sake of argument, we'll assume the wall is entirely stone.1 Thus, a mage-shaped stone object is found at the embarkation point and our wayward mage is wholly ensconced in stone.
The mage is dead.
- Lack of oxygen (the only oxygen molecules are those carried by and within the layers of the fabric of the clothing).
- If the mage was exhaling at the time of transfer (most likely, speaking the spell after all), then he/she has no ability to take a breath if there was oxygen (chest is restricted due to being partially or fully collapsed at transport).
- Unless the spell can be easily traced, nobody knows where the mage is.
- Even if it is easily traced (that would seem to be a weakness to me), would-be rescuers have mere seconds to remove the mage from the wall — which seems unlikely even if the transport was only ten feet away because, sans magic (which can do anything) the option is chisels and the fervent hope that you don't pierce the mage's heart while pounding on the chisel.
Case 2: Mage is partially encased in the wall, facing inward
The wall is thick enough that the mage's face and forward-half of his/her body is ensconced in stone. The mage's rear bumper is hanging out for the village fool to make fun of.2
The mage is probably dead.
We have the same lack-of-oxygen and difficulty breathing problems as before... except that the body has somewhere to go when muscles move. This suggests the plausible conclusion that the mage could get some air, even if they can't dislodge themselves from the stone.
In this case, since we're talking about a wall, it's believable that someone would find the mage.
Without magic, we're chipping away the stone with chisels, but at least the mage has a theoretical chance.
Note that it's also plausible that the lack of air and constriction breathing are still in play. In which case the mage is dead unless saved within seconds.3
Case 3: Mage is partially encased in the wall, facing outward
The wall is thick enough that the mage's face and rear-half of his/her body is ensconced in stone. The mage is, for all intents and purposes, fully exposed to the mockery and jests of the village fool.4
Hooray! The mage lives!
Even if the mage is stuck without the aid of magic or chisels, he/she can breathe freely!
What we hope is that said mage isn't soon due for a bathroom break.
Hey! You said a dead mage isn't a bad thing! What gives!
Whether you're writing a story or setting up an RPG, the idea of failure is just as important as the idea of success — and how your characters/PCs/NPCs deal with both is part of what makes for a rich literary experience. In other words, you want your mages to face very real death if they're dingy enough to teleport into a wall. I mean, let's face it, whether they teleport to the center of a very thick wall or the center of a mountain, unless they can be VERY quickly found, they're dead. If they don't have the space to move their hands, they don't have the oxygen to live very long. Even if they do have the space to move their hands, they still may not have the oxygen to get through the spell.
So, you can either make your magic (a) traceable or (b) always able to leave the mage with enough space to breathe and wave their arms or (c) deal with the reality that you'll have a few well-fertilized walls.
Maybe I should have identified this as a Frame Challenge. I haven't decided.
1 Rather than a modern wall made of lumber and sheetrock, which would make for an interesting discussion... especially if electrical wires and any kind of plumbing is involved. But what if we're talking about a thatch wall? The mage would simply step out of it. Wood? That might have the same problem as stone.... That's a honking thick timber wall, though. Adobe? That would be hilarious. Let's stick with stone.
2 And the world is grateful that's all the little wombat is doing.
3 And a very real argument could be made that the mage dies anyway due to the confusion/panic caused by the realization that the village fool is in close proximity to the rear bumper. I mean this. Never underestimate the panic reaction to realizing something you can't see, probably can't hear, and can't react to, just touched you.
4 We'll leave it to the Grand High Council of the August and Illuminated Fellowship of the Oracine Rite (aka Fat Henry, who's the secretary of said council and the guy who does all the paperwork. For a Snickers bar he'll induct your cat to the Order) to decide the Ultimate Fate of a mage who paid so little attention to what they were doing that they'd end up in a wall. Embarrassment tends to be quickly rewarded (and long remembered) by the Council.