I'm puzzled by the "a clear path to the target" rule.
To target something, you must have a clear path to it, so it can't be behind total cover.
This seems straightforward: you can't target a point/creature/object/thing behind total cover. But then the rule adds the following:
If you place an area of effect at a point that you can't see and an obstruction, such as a wall, is between you and that point, the point of origin comes into being on the near side of that obstruction.
And now suddenly I'm lost. You can't do A, but if you do, then B happens.
Let's assume a blind wizard stuck is in a maze, facing a wall he's not aware of. He's trying to cast fog cloud behind it.
How should the DM react, according to the rules?
I mostly see 3 options (but feel free to add others):
"No you can't. Choose another target / action."
This is the strict application of the rule's first sentence.
"Even though you placed your spell 60 feet away, you feel a strong humidity on your skin. It looks like the fog cloud appeared closer than what you intended."
This would be the application of the rule's second sentence.
"You say the words and do the gestures, but nothing happens."
As found here, Xanathar's Guide to Everything offers optional rules for invalid targets — that you can use... if you feel this falls into invalid targeting.
What bothers me is that the first option seemed to have an broad consensus (~90 person before the associated answer update): not only does it render the second sentence obsolete, but it allows the player to gain information on it's environment without spending actions. Suddenly, the wizard gains some kind of radar that allows him to check if the path in front of him is free, and circulate quickly in a maze made of prismatic walls without harm. This can't be right... right?