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 at13d6988c, post v2.2.5) - Laravel 12.58.0, PHP 8.3.32, MySQL, default
QUEUE_CONNECTION=sync
Steps to reproduce
- Fresh Krayin 2.2 install (default
QUEUE_CONNECTION=sync). - Go to Settings → Data Transfer → Imports → Create Import.
- Do not touch the "Process in queue" switch (leave it at its default).
- Upload a valid persons CSV, set action "Append", validation "Stop on errors", fill the rest, and click Save.
- 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
400withsetup-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="">(notecheckedpresent andvalue="on", despite the view defaulting it to false). - DB:
process_in_queue=1for 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): thecheckedattribute is consumed as a raw string byv-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"inpackages/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 (includingon/0) astrue, so even a properly unchecked switch that submits0would still be forced totrue.ImportController::start()(~line 274): blocks withsetup-queue-errorwhenprocess_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 passingcheckedthrough as a raw string).
Source: krayin/laravel-crm