[xwiki-devs] Merge XWIKI-5296 and XWIKI-6546 in 2.7 branch