Import "Process in queue" switch renders ON by default; imports fail on default sync queue

Author: sagarkumar-webkulCreated Aug 10, 2026Updated Aug 11, 2026
LabelsBugFix Proposed

Summary

When creating an import (Settings → Data Transfer → Imports), the "Process in queue" switch is rendered in the checked/ON state even though the view passes :checked="false". Every created import therefore gets process_in_queue = 1. Combined with the controller treating presence of the field as true, this makes every import fail to start on a default installation (QUEUE_CONNECTION=sync) with:

Please change your queue driver to "database" or "redis" to start the import process.

Environment

  • Branch: 2.2 (tested at 13d6988c, post v2.2.5)
  • Laravel 12.58.0, PHP 8.3.32, MySQL, default QUEUE_CONNECTION=sync

Steps to reproduce

  1. Fresh Krayin 2.2 install (default QUEUE_CONNECTION=sync).
  2. Go to Settings → Data Transfer → Imports → Create Import.
  3. Do not touch the "Process in queue" switch (leave it at its default).
  4. Upload a valid persons CSV, set action "Append", validation "Stop on errors", fill the rest, and click Save.
  5. On the import summary page click Start Import.

Expected

  • The switch should be OFF by default (per :checked="false").
  • The import should start and process rows synchronously (no queue needed since the switch is off).

Actual

  • The switch is rendered ON.
  • The import record is stored with process_in_queue = 1 (verified in DB).
  • Starting the import returns 400 with setup-queue-error. The import can never be processed on a default install.

Evidence

  • Rendered checkbox DOM: <input type="checkbox" name="process_in_queue" id="process_in_queue" class="peer sr-only" checked=""> (note checked present and value="on", despite the view defaulting it to false).
  • DB: process_in_queue=1 for imports created with the switch untouched.

Likely root cause

  • packages/Webkul/Admin/src/Resources/views/components/form/control-group/control.blade.php (@case('switch'), ~line 265): the checked attribute is consumed as a raw string by v-checked-handler (checked="{{ $attributes->get('checked') }}", ~line 286), so :checked="false" arrives as the truthy string "false" and the field is force-checked. The create view passes :checked="false" in packages/Webkul/Admin/src/Resources/views/settings/data-transfer/imports/create.blade.php:216.
  • packages/Webkul/Admin/src/Http/Controllers/Settings/DataTransfer/ImportController.php (store(), ~line 77): if (! isset($data['process_in_queue'])) ... else $data['process_in_queue'] = true; — treats any submitted value (including on/0) as true, so even a properly unchecked switch that submits 0 would still be forced to true.
  • ImportController::start() (~line 274): blocks with setup-queue-error when process_in_queue && config('queue.default') == 'sync'.

Suggested fix

  • Respect the actual submitted value in store(): $data['process_in_queue'] = (bool) request('process_in_queue');
  • Fix the switch control so :checked="false" actually renders unchecked (bind the value properly instead of passing checked through as a raw string).