Exteding ImageGalleryPage  gives Unknow Class error

Extended a ImageGalleryPage without any modfication to DB gives error.