Fixing the Check-out failed error in Joomla

From time to time you may encounter a Joomla error that says “Check-out failed with the following error: The user checking out does not match the user who checked out the item.” followed by “You are not permitted to use that link to directly access that page”. There is actually a really simple, albeit not that
Source