WSD checkbox handler: JS syntax error on Settings → SMB page
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 253
- Forks
- 106
- Avg merge
- 6d 22h
- Merged PRs (30d)
- 12
Description
1. WSD checkbox handler: JS syntax error on Settings → SMB page
Where: Settings → SMB page, inline <script> block, function
checkWSDSettings().
Broken code (from browser DevTools, jumped to via console stack trace):
function checkWSDSettings() {
form=document.SMBEnable;
if (form.USE_WSD.value=="yes" && 1 {
form.WSD2_OPT.disabled=false;
} else {
form.WSD2_OPT.disabled=true;
}
}
The bug: missing closing ) before the opening { —
if (form.USE_WSD.value=="yes" && 1 { should presumably be
if (form.USE_WSD.value=="yes") { (the stray && 1 looks like leftover
debug/dead code from a prior edit, in addition to the missing paren).
Impact: this is an Uncaught SyntaxError: missing ) after condition,
which means the entire containing <script> block fails to parse and
none of it executes — not just the WSD checkbox logic. Whatever else
might be defined in that same script block (unconfirmed — we only saw the
one function via the truncated view) is also silently broken. Practically,
the WSD2_OPT checkbox's enabled/disabled state likely never responds to
changes in the USE_WSD dropdown/checkbox as intended.
How we found it: browser console showed
Uncaught SyntaxError: missing ) after condition [SMB:2914:38] while
testing an unrelated script we added via our own plugin's .page file on
the same Settings → SMB page. Confirmed unrelated to our code by clicking
the console's source link, which pointed directly at this function.
Environment:
- Confirmed present as of 2026-08-26 testing.
- Unraid WebGUI API version seen in console:
4.10.0+81808ad
(dynamix.my.servers/Connect plugin — note this may not be the same as
the core Unraid OS version number; grab that separately, e.g. from
Tools > System Informationorcat /etc/unraid-version, before
submitting). - Also reproduced separately on Unraid 7.3.2 during later testing
(same session, September 2026).
Suggested fix: if (form.USE_WSD.value=="yes") { — remove the stray
&& 1 and close the parenthesis before the brace. Not something we can
verify further (would need visibility into what WSD2_OPT is supposed to
control) but the syntax fix itself is unambiguous.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open Settings → SMB and use the console source link (SMB:2914:38) to locate the inline script and checkWSDSettings(). Confirm the condition parses and that changing USE_WSD updates WSD2_OPT; done when the page script loads without a SyntaxError and the control state responds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100