yii2-sortable
yii2-sortable copied to clipboard
Doesn't work without url rewrite
The $baseUrl property assumes /sort/ url is accessible, but if you don't have enablePrettyUrl = true it won't work
More than this with the current behavior it won't work if the Yii app is not in the root of the webserver. I've changed the OrgSortableColumn initialization this way:
$this->_origSortableColumn = Yii::createObject([
'class' => OrigSortableColumn::className(),
'grid' => $this->grid,
'template' => $this->template,
'buttons' => $this->buttons,
'gridContainerId' => $this->gridContainerId,
'confirmMove' => $this->confirmMove,
'baseUrl' => Url::to([$this->baseUrl])."/",
]);