We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi I get that error using BulkUploader in SS4.3
Uncaught Exception BadMethodCallException: "Items must be saved before adding to a changeset"
That s my gridfield-config
$gridFieldConfig=GridFieldConfig::create() ->addComponent(new GridFieldButtonRow('before')) ->addComponent($dataColumn=new GridFieldDataColumns) ->addComponent(new GridFieldDeleteAction()) ->addComponent(new GridFieldEditButton()) ->addComponent(new GridFieldDetailForm()) ->addComponent(new GridFieldSortableHeader()) ->addComponent(new GridFieldFilterHeader()) ->addComponent(new GridFieldPaginator()) ->addComponent(new GridFieldAddNewButton()) ->addComponent($bulkUploader=new \Colymba\BulkUpload\BulkUploader('Image'))
The DataObject
use Silverstripe\ORM\DataObject; use Silverstripe\Assets\Image; class GalleryImage extends DataObject{ private static $table_name="galleryimage"; private static $db=[ "SortID"=>"Int" ]; private static $has_one=[ "Image"=>Image::class, ]; private static $belongs_many_many=[ "Galleries"=>Gallery::class ]; public function onAfterWrite() { $this->Image()->doPublish(); } public function getThumbnail(){ return $this->Image()->CMSThumbnail(); } }
;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi I get that error using BulkUploader in SS4.3
Uncaught Exception BadMethodCallException: "Items must be saved before adding to a changeset"
That s my gridfield-config
The DataObject
The text was updated successfully, but these errors were encountered: