Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-14560

general error page: missing hint in case that client data are missing

    Details

    • Type: Enhancement
    • Status: Plan (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.2
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      A processing error will show the error page ./keycloak/themes/base/login/error.ftl

      But in case of a possible internal error, the client data are not available
      and the <a href> section is not shown, because of check <#if client?? && client.baseUrl?has_content>

      To point the user to any action, an <#else> branch is requiert.

      I added as PoC such message part in case client data are not available:
      ./keycloak/themes/base/login/error.ftl

      <#import "template.ftl" as layout>
      <@layout.registrationLayout displayMessage=false; section>
          <#if section = "header">
              ${msg("errorTitle")}
          <#elseif section = "form">
              <div id="kc-error-message">
                  <p class="instruction">${message.summary?no_esc}</p>
                  <#if client?? && client.baseUrl?has_content>
                      <p><a id="backToApplication" href="${client.baseUrl}">${kcSanitize(msg("backToApplication"))?no_esc}</a></p>
                  <#else>
                      <p>${msg("backGeneral")}</p>
                  </#if>
              </div>
          </#if>
      </@layout.registrationLayout>
      

      The message bundles will conatin the new backGeneral message:
      ./keycloak/themes/base/login/messages/messages_de.properties

      backGeneral=Bitte klicken Sie im Browser auf den Zur\u00FCck Button und versuchen Sie es noch einmal
      

      ./keycloak/themes/base/login/messages/messages_en.properties

      backGeneral=Please click in your browser the back button and retry again
      

      How to produce an internal error, where client data are empty? take a look at KEYCLOAK-13305 where Keycloak runs with MySQL and utf-8 characterset, but user enters character included in utf8mb4 characterset

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  patrikschwieger Patrik Schwieger
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: