GridFieldBulkEditingTools icon indicating copy to clipboard operation
GridFieldBulkEditingTools copied to clipboard

setAutoPublishDataObject not working

Open schrattenholz opened this issue 2 years ago • 1 comments

Hej, after uploading through bulkuploader and saving, the dataobject is still in draftmode.. any ideas about that?

//GridField $gridFieldConfig=GridFieldConfig::create() ->addComponent(new GridFieldButtonRow('before')) ->addComponent($dataColumn=new GridFieldDataColumns()) ->addComponent(new GridFieldToolbarHeader()) ->addComponent(new GridFieldTitleHeader("Bild","Titel","Adult")) ->addComponent(new GridFieldDetailForm()) ->addComponent($editableColumns=new GridFieldEditableColumns()) ->addComponent(new GridFieldDeleteAction()) ->addComponent(new GridFieldEditButton()) ->addComponent(new GridFieldOrderableRows('SortID')) ->addComponent($bulkUploader=new \Colymba\BulkUpload\BulkUploader("Image")) ; $editableColumns->setDisplayFields(array( 'Title' => array( 'title' => 'Titel', 'callback' => function($record, $column, $grid) { return TextField::create($column); }) )); $bulkUploader->setAutoPublishDataObject(true);

class CO_Gallery_Image extends DataObject{ private static $table_name="CO_Gallery_Image"; private static $db=[ 'Title'=>'Varchar(255)', 'SortID'=>'Int', 'Adult'=>'Boolean', 'Video'=>'Text', 'Video_Autoplay'=>'Boolean', 'Video_Format'=>'Enum("16-9,4-3","16-9")' //'DeepLinkHash'=>'Boolean' ]; private static $has_one=[ "Image"=>Image::class, "Gallery"=>CO_Gallery::class, 'DeepLink'=>SiteTree::class ]; private static $extensions = [ Versioned::class, ]; private static $owns=[ 'Image' ];

schrattenholz avatar Mar 30 '22 17:03 schrattenholz

Would be great if that could be fixed.

Thank you

MLindenhofer avatar Oct 04 '22 09:10 MLindenhofer