The story is about a modest farmer and his two sons 

Once in ancient times a modest farmer had two sons. They told their father:

“Father, we wish to travel the whole world and look for the means of subsistence that will make us happy. We would like to give it a try. If we become very poor, we will come back and follow your path,” and they left the village.

Allah’s grace made them meet a saint on the way. The saint said:

“Boys, you are the sons of a generous farmer, ask of me whatever you wish to have. It is my duty to fulfil it.”

The more knowledgeable of the young boys, mounted on a farm horse said:

“May Allah thank you, I did not come to this world to call out prayers and wishes all day. I can work. I am mentally sound. If I am not worthy of what I have, may I find what I’m worth.”

 The saint said in reply:

“May Allah be with you, my son, go find your fortune.”

The other young boy, who was riding on a mare, said:

“My master, how lucky that I met you. I don’t want to spend my whole life trying to earn just one loaf of bread. Give me wealth.”

“OK, pass through this river, and you’ll find a cave in the mountains there. You will see a grand gate to the cave. Open that gate and take the treasure inside,” said the saint and gave him the key. “My advice is that when you go to get the treasure, just don’t forget the real thing.”

Obviously the young boy did not listen to the advice of the saint, for he had learned exactly where the treasure was. He took off his clothes, held the key in his teeth and jumped into the river. He swam to the other side of the river. As the saint had told him, he reached the cave and opened its door. He saw that there was a great treasure inside. But he had nothing with him to put the treasure in; he had no bag or sack! Then the boy realized that he had forgotten to take the real thing. Nevertheless, he tried to take as much as he could and left the cave. He wished to enter again, but the door was closed already. The saint appeared nearby at that very moment:

“So, that’s your share of the treasure, young boy! Because you forgot three essential things: First, you should have thought about how much you should take, second, how to take it, and third you left the key to wealth inside for a fistful of gold!”

(366-367.)