Ali Baba's powerful uncle hates how his nephew visits many beds of the caliphate and fetches a professor to set Ali Baba on the straight-and-narrow, but Ali humiliates the professor. Thinking Ali Baba is gay, Qadi's wife sets up a wedding, enlisting the help of a sorceress's magic potion to make Ali Baba fall for the selected woman, but the bride-to-be falls for Ali Baba instead.