Fixing bugs #2690, #5617, #5721 and #5827

See tracker.silverpeas.org for further details.