Alrighty! This is a topic with the problem, and the solution along with it!
While gardening, my sim would often end up with vegetables stuck in his inventory. They become unclickable, can't be sold, can't be used in recipes, nothing. Hating that, I had to roll back my save. Then it happened again, and it annoyed me to no end.
The solution is quite simple, though. Save the game, go to the main menu, and load it again. When you're back, the bugged items are gone.
Hope this helps!