Fix notices displayed when failing to add a new node.

Actual case:
When failing to add new node a lot of notices show up (undefined vars and indexes).

This commit prevents those notices to be displayed by moving _setCommonVariables() outside main if statement in admin_add action.