frankmullenger / silverstripe-gallery

Image gallery for SilverStripe 3
23 stars 17 forks source link

Fixed issue with using field in a page managed by ModelAdmin #4

Closed thezenmonkey closed 11 years ago

thezenmonkey commented 11 years ago

When using a ModelAdmin to manage GalleryPages looking for Controller::curr() returns the ModalAdmin instead of the required controller. I suggest pushing the ID the to the GalleryUploadField_ItemHandler since it the correct ID is still availabe at that point

frankmullenger commented 11 years ago

Thanks for this! Presumably the pages still work in the SiteTree?

thezenmonkey commented 11 years ago

Yes, only when managing the Pages through a ModelAdmin like the ExcludeChildren module does the field fail.