Skip to content

Add missing auth_settings_validation_error lang string - #70

Closed
Mark Nelson (mdjnelson) wants to merge 1 commit into
microsoft:masterfrom
nord-anglia-education-limited:m-5.3-dev
Closed

Mark Nelson (mdjnelson) wants to merge 1 commit into
microsoft:masterfrom
nord-anglia-education-limited:m-5.3-dev

Conversation

@mdjnelson

@mdjnelson Mark Nelson (mdjnelson) commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • auth_oidc_validate_auth_settings() in lib.php (added in a13728f, "Re-organise configuration pages for auth_oidc and local_o365...") calls get_string('auth_settings_validation_error', 'auth_oidc') to build the notification shown when settings validation fails, but the corresponding lang string was never added to lang/en/auth_oidc.php.
  • This causes a missing-string debugging() call whenever validation errors are found (e.g. OpenID Connect enabled/configured with an incomplete client secret/certificate setup) - on sites with elevated debug output this surfaces as a visible error rather than the intended admin notification.

Fix

Adds the missing string:

$string['auth_settings_validation_error'] = 'There are problems with the OpenID Connect settings:';

auth_oidc_validate_auth_settings() in lib.php (added in a13728f, 'Re-organise
configuration pages for auth_oidc and local_o365...') calls
get_string('auth_settings_validation_error', 'auth_oidc') to build the
notification shown when settings validation fails, but the corresponding
lang string was never added.
@weilai-irl

Copy link
Copy Markdown
Collaborator

Mark Nelson (@mdjnelson)

The change itself looks good. However, this is a read only repo for Moodle plugin directory integration purposes, and no development is done in this repo. All changes need to be made in the main repo at https://github.com/microsoft/o365-moodle.

I'll merge the changes in the main repo in this case. I'll close this PR.

Regards,
Lai

@mdjnelson

Copy link
Copy Markdown
Contributor Author

Ah, my apologies Lai Wei (@weilai-irl). I should have read the README.md first. Sorry about that, and thanks for moving this forward.

Lai Wei (weilai-irl) added a commit to microsoft/o365-moodle that referenced this pull request Aug 25, 2026
Two commits independently added the same string keys without
detecting the existing definitions, leaving two definitions each
for error_masked_secret_not_changed and auth_settings_validation_error:

- bcd2239 (Implement Azure portal style secret / certificate
  passphrase protection) added error_masked_secret_not_changed with
  wording that predates the "Change" checkbox UX.
- 1cf6fb9 (Re-organise configuration pages for auth_oidc and
  local_o365...) re-added error_masked_secret_not_changed with
  updated wording matching the current checkbox-based UX, and also
  added auth_settings_validation_error - duplicating the fix applied
  in the previous commit on this branch (cherry-picked from
  microsoft/moodle-auth_oidc#70), which wasn't actually needed here
  since 1cf6fb9 already carried it with different wording.

Keep the newer/current definitions (the ones matching the "Change"
checkbox UX) and drop the stale/redundant ones.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
Lai Wei (weilai-irl) added a commit to microsoft/o365-moodle that referenced this pull request Aug 25, 2026
Bring in line with wip-136768-m405: drop the auth_settings_validation_error
added directly after auth_oidcdescription (from microsoft/moodle-auth_oidc#70)
and the stale error_masked_secret_not_changed wording that predates the
"Change" checkbox UX, replacing both with the current wording already used
on m405, in the error-strings block after error_invalid_custom_claim.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
Lai Wei (weilai-irl) added a commit to microsoft/o365-moodle that referenced this pull request Aug 25, 2026
Bring in line with wip-136768-m405: drop the auth_settings_validation_error
added directly after auth_oidcdescription (from microsoft/moodle-auth_oidc#70)
and the stale error_masked_secret_not_changed wording that predates the
"Change" checkbox UX, replacing both with the current wording already used
on m405, in the error-strings block after error_invalid_custom_claim.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
Lai Wei (weilai-irl) added a commit to microsoft/o365-moodle that referenced this pull request Aug 25, 2026
Bring in line with wip-136768-m405: drop the auth_settings_validation_error
added directly after auth_oidcdescription (from microsoft/moodle-auth_oidc#70)
and the stale error_masked_secret_not_changed wording that predates the
"Change" checkbox UX, replacing both with the current wording already used
on m405, in the error-strings block after error_invalid_custom_claim.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
Lai Wei (weilai-irl) pushed a commit that referenced this pull request Sep 2, 2026
auth_oidc_validate_auth_settings() in lib.php (added in a13728f, 'Re-organise
configuration pages for auth_oidc and local_o365...') calls
get_string('auth_settings_validation_error', 'auth_oidc') to build the
notification shown when settings validation fails, but the corresponding
lang string was never added.

Cherry-picked from #70
(2c8b686)
Lai Wei (weilai-irl) added a commit that referenced this pull request Sep 2, 2026
Two commits independently added the same string keys without
detecting the existing definitions, leaving two definitions each
for error_masked_secret_not_changed and auth_settings_validation_error:

- bcd2239 (Implement Azure portal style secret / certificate
  passphrase protection) added error_masked_secret_not_changed with
  wording that predates the "Change" checkbox UX.
- 1cf6fb9 (Re-organise configuration pages for auth_oidc and
  local_o365...) re-added error_masked_secret_not_changed with
  updated wording matching the current checkbox-based UX, and also
  added auth_settings_validation_error - duplicating the fix applied
  in the previous commit on this branch (cherry-picked from
  #70), which wasn't actually needed here
  since 1cf6fb9 already carried it with different wording.

Keep the newer/current definitions (the ones matching the "Change"
checkbox UX) and drop the stale/redundant ones.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
Lai Wei (weilai-irl) pushed a commit that referenced this pull request Sep 2, 2026
auth_oidc_validate_auth_settings() in lib.php (added in a13728f, 'Re-organise
configuration pages for auth_oidc and local_o365...') calls
get_string('auth_settings_validation_error', 'auth_oidc') to build the
notification shown when settings validation fails, but the corresponding
lang string was never added.

Cherry-picked from #70
(2c8b686)
Lai Wei (weilai-irl) added a commit that referenced this pull request Sep 2, 2026
Bring in line with wip-136768-m405: drop the auth_settings_validation_error
added directly after auth_oidcdescription (from #70)
and the stale error_masked_secret_not_changed wording that predates the
"Change" checkbox UX, replacing both with the current wording already used
on m405, in the error-strings block after error_invalid_custom_claim.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
Lai Wei (weilai-irl) pushed a commit that referenced this pull request Sep 2, 2026
auth_oidc_validate_auth_settings() in lib.php (added in a13728f, 'Re-organise
configuration pages for auth_oidc and local_o365...') calls
get_string('auth_settings_validation_error', 'auth_oidc') to build the
notification shown when settings validation fails, but the corresponding
lang string was never added.

Cherry-picked from #70
(2c8b686)
Lai Wei (weilai-irl) added a commit that referenced this pull request Sep 2, 2026
Bring in line with wip-136768-m405: drop the auth_settings_validation_error
added directly after auth_oidcdescription (from #70)
and the stale error_masked_secret_not_changed wording that predates the
"Change" checkbox UX, replacing both with the current wording already used
on m405, in the error-strings block after error_invalid_custom_claim.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
Lai Wei (weilai-irl) pushed a commit that referenced this pull request Sep 2, 2026
auth_oidc_validate_auth_settings() in lib.php (added in a13728f, 'Re-organise
configuration pages for auth_oidc and local_o365...') calls
get_string('auth_settings_validation_error', 'auth_oidc') to build the
notification shown when settings validation fails, but the corresponding
lang string was never added.

Cherry-picked from #70
(2c8b686)
Lai Wei (weilai-irl) added a commit that referenced this pull request Sep 2, 2026
Bring in line with wip-136768-m405: drop the auth_settings_validation_error
added directly after auth_oidcdescription (from #70)
and the stale error_masked_secret_not_changed wording that predates the
"Change" checkbox UX, replacing both with the current wording already used
on m405, in the error-strings block after error_invalid_custom_claim.

Also removes a pre-existing upstream duplicate,
errorauthdisconnectinvalidmethod (added twice, identically, in
6f8e952 back in 2015). Harmless since both copies had the same
value, but redundant.
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