GalleryId is always null

GalleryId is always null and there is no gallery outputed.