Merge branch 'hotfix/4776'

Close #4776
Fixes #4735
Change mode from 644 to 755 templatemap_generator.php
Merge branch 'hotfix/4777' into develop

Forward port #4777