fix a bug when the form for a new content entry is submitted in JSON
apply patch for the issue #1004 (Wrong link for nested page in sitemap)