mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
FIX Row updating broken in SilverStripe 4 (#197)
Row updating is broken in SilverStripe 4 when for example using the PublishHandler or UnPublishHandler actions. This is due to unescaped backslashes in the fully qualified class name in json data, which when parsed in javascript treats the backslash as an escape character. This can be fixed by escaping the backslash character in HTTPBulkToolsResponse.
This commit is contained in:
parent
ece0e209ef
commit
d420a29e9f
@ -334,7 +334,7 @@ class HTTPBulkToolsResponse extends HTTPResponse
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($this->successRecords as $record) {
|
foreach ($this->successRecords as $record) {
|
||||||
$data = array('id' => $record->ID, 'class' => $record->ClassName);
|
$data = array('id' => $record->ID, 'class' => str_replace('\\', '\\\\', $record->ClassName));
|
||||||
if (!$this->removesRows) {
|
if (!$this->removesRows) {
|
||||||
$data['row'] = $this->getRecordGridfieldRow($record);
|
$data['row'] = $this->getRecordGridfieldRow($record);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user