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
Merge pull request #331 from fdv/bug/broken-permalink-creation/328

Fixes the permalink generation.