adjustments for Drupal 8
adjustments for Drupal 8

based on D8 beta 1. These fixes were made on the code of the about 4 months
before, but didn't work on D8 beta 1.

devpanel/serverlink,devpanel/serverlink,devpanel/serverlink,devpanel/serverlink,devpanel/serverlink