diff --git a/public/userarea/validate_export.php b/public/userarea/validate_export.php index ecbd835..b20e413 100644 --- a/public/userarea/validate_export.php +++ b/public/userarea/validate_export.php @@ -1,4 +1,5 @@ (int)($r['templateid'] ?? 0), + fn($r) => (int)($r['templateid'] ?? 0), $recordsInfo )))); @@ -210,13 +211,14 @@ try { $requiredFixedByTemplate[(int)$r['template_id']][$key] = $key; } - // Required custom fields that are visible in the import grid + // Required custom fields that are visible in the import grid (excluding filed_id = 189 Tested component) $stmt = $pdo->prepare(" SELECT id AS mapping_id, template_id, field_label FROM template_mapping WHERE template_id IN ($tplPlaceholders) - AND is_required = 1 - AND is_visible_import = 1 + AND is_required = 1 + AND is_visible_import = 1 + AND id <> 189 "); $stmt->execute($templateIds); foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $r) { @@ -272,7 +274,6 @@ try { } echo json_encode(['success' => true, 'results' => $results]); - } catch (Exception $e) { error_log("Validation error: " . $e->getMessage()); echo json_encode(['success' => false, 'message' => $e->getMessage()]);