It's almost like Iran republished that article on purpose. The way the Onion did it sort of shined a good light on the Iranian leader, except for a few sentences which were conveniently removed when they copied the article. So I would not be surprised if this was all intentional. Would also not be surprised if The Onion did this just to see if Iran would reproduce the piece.
Certainly wouldn't put it past the Onion, but I'm inclined to think the Iranians just screwed up. They may be so acclimated to printing their own propaganda, they believe it; and with the language barrier, they could easily have just stumbled on the thing, not realized it was humor, and run with it. Not that I'm ruling anything out, but that's my inclination.