I came across a small bug in System Admin > Import From File > Import History. As soon as there’s at least one import in gibbonLog, the page shows the generic “Oh no! Something has gone wrong” error.
The cause is in modules/System Admin/import_history.php. The array_map closure calls $logGateway->getLogData(), but $logGateway isn’t included in the closure’s use list, so it’s undefined inside the function:
$logsByType = array_map(function ($log) use (&$importTypeList) {
$log\['data'\] = $logGateway->getLogData($log\['serialisedArray'\] ?? '');
The fix is a one-line change:
$logsByType = array_map(function ($log) use (&$importTypeList, $logGateway) {
I’ve patched it locally on a v30.0.02 site and the page loads fine now. It’s still present in main as of this week. Would one of you be able to pick it up in a PR?
Thanks,
Tieku