Add the parameters to the preview link, remove themeId and environment

if they are null.