iot-onboarding / iot-onboarding/mudmaker
Broken oauthp2 call in mudmaker.html (case mismatch + invalid <p> onload)
- Dominant language
- Python
- Stars
- 6
- Forks
- 3
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
## Summary
`mudmaker.html` line 153 contains a call to `oauthp2(this)` from a `
` attribute. This code is broken for two independent reasons:
1. **Case mismatch** — the function defined in `assets/js/omud.js` (line ~148) is `oAuthP2()` (camelCase). No function named `oauthp2` (all lowercase) exists anywhere in the codebase, so the call would throw a `ReferenceError` if it ever ran.
2. **Invalid event** — `
` elements do not fire `onload` events, so the handler never executes. The code is effectively unreachable.
For reference, the correctly-cased `oAuthP2()` is properly invoked from `mudpublish.html` via ``, which is the working path.
## Location
- `mudmaker.html`, line 153: `
`
- Defined as `oAuthP2()` in `assets/js/omud.js` (~line 148)
#####################################################################################################################################################################################################t ###### trigger the OAuth phase-2 handler on this page, move the call into a supported event (e.g., `` or a `DOMContentLoaded` listener) and fix the casing to `oAuthP2()`.
## How it was found
Surfaced during a workspace-wide audit for unused JavaScript functions — this was the only dead-code finding across the custom JS sources.
Contributor guide
Research direction
Inspect mudmaker.html around line 153 and compare it with the working body onload call in mudpublish.html. Read the oAuthP2() definition around line 148 of assets/js/omud.js, then verify the handler runs from a supported page event with the corrected casing and no console ReferenceError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100