Skip to content

fix(admin): use benchpress render for OAuth strategy modal - #175

Open
MarionLenfant wants to merge 1 commit into
NodeBB:mainfrom
MarionLenfant:main
Open

fix(admin): use benchpress render for OAuth strategy modal#175
MarionLenfant wants to merge 1 commit into
NodeBB:mainfrom
MarionLenfant:main

Conversation

@MarionLenfant

Copy link
Copy Markdown

Summary

  • On NodeBB 4, app.parseAndTranslate() returns a jQuery object, while bootbox / modals.confirm expect an HTML string for message.
  • Creating or editing an OAuth2 strategy in ACP therefore fails with: "message" option must not be null or an empty string.
  • Switch the New/Edit strategy modal to render() from benchpress (already used elsewhere in this file), which returns a string.

Test plan

  • Install/activate this branch on NodeBB ≥ 4.14
  • ACP → Plugins → Multiple OAuth2 → New Endpoint opens the strategy modal (no console error)
  • Fill and save a strategy, then Edit it — modal opens with existing values
  • OAuth login flow still works (runtime unchanged; ACP-only fix)

@julianlam

Copy link
Copy Markdown
Member

render doesn't translate, hence the helper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants