Fixes the permalink generation.

Since the permalink field was absent from the form, the permalink generation could not properly happen.

This solves issue #328
This also solves issue #324
This also deals with issue #322