use permalink instead of slug in 2.1