Check REPOSITORY is setted before autofix.
Give id as permalink when link is empty