Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Sortable GridField unexpected token

Go to End



Community Member, 254 Posts

15 October 2013 at 3:34pm

HI All.
I'm running SS 3.0.8, and trying to make use of UndefinedOffset/SortableGridField

And getting "Unexpected token u GridField.js:83" when checking "Allow Drag and Drop". Anyone had similar issues or know of a fix/alternative?

My cms fields function looks like

if( $this->exists() ) {
$config = GridFieldConfig_RelationEditor::create(10);
$config->addComponent(new GridFieldBulkEditingTools());
$config->addComponent(new GridFieldBulkImageUpload());
$config->addComponent(new GridFieldSortableRows('SortOrder'));
$gridfield = new GridField( 'Products', 'Products', $this->Products() );
$gridfield->setConfig( $config );

// set display field
$columns = $gridfield->getConfig()->getComponentByType('GridFieldDataColumns');
'Thumbnail' => 'Image',
'Label' => 'Label',
'UUID' => 'UUID'

$fields->replaceField( 'Products', $gridfield );