Getting invalid URL when adding link for editing