/
The "OnDeleteExportPreset" event isn't AJAX friendly [5.2.2-B1]

The "OnDeleteExportPreset" event isn't AJAX friendly [5.2.2-B1]

The "OnDeleteExportPreset" event is used to delete export preset (created from "Orders Export" screen in In-Commerce). The event itself is called via AJAX only, but doesn't internally indicate that and as a result attempts to parse current template. This doesn't make any sense, because event result is never used anywhere.

Solution

Add following code in the event beginning:

$event->status = kEvent::erSTOP;
 
if ( $this->Application->GetVar('ajax') != 'yes' ) {
    return;
}

Related Tasks