fixes #5520 saving content with the expire date before the publish date

Fixed the issue and pushed the code for review, please check it.