product-is icon indicating copy to clipboard operation
product-is copied to clipboard

Re-branding WSO2 Identity Server UIs guide contains incorrect code samples

Open isuruhettiarachchi opened this issue 4 years ago • 1 comments

Is your suggestion related to a missing or misleading document? Please describe.

  1. In the document [1], sample code given in step 1 to copy in to header.jsp file contains invalid characters (LATIN SMALL LETTER A WITH CIRCUMFLEX character) instead of quote symbols.
  • Provided code
<%@include file=”../includes/localize.jsp” %>
<%@include file=”../includes/init-url.jsp” %>
  1. In the document [1], sample code snippet given in step 2 does not match with the imports already available product-footer.jsp file copied from includes folder.
  • Available import in product-footer.jsp is as follows
<%@ page import="org.wso2.carbon.identity.application.authentication.endpoint.util.AuthenticationEndpointUtil" %>

But in the code provided in document referring to IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, ...) instead of AuthenticationEndpointUtil.i18n(resourceBundle, ...)

  • Given sample code
    <footer class="footer">
        <div class="container-fluid">
            <p>XYZ Company | &copy;
                <script>document.write(new Date().getFullYear());</script>
                <a href="<%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "business.homepage")%>"
                   target="_blank">
                   <i class="icon fw fw-wso2"></i>
                   <%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "Inc")%>
                </a>
                . <%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "All.rights.reserved")%>
            </p>
        </div>
    </footer>

Describe the improvement

  1. Change the code with quote symbols
<%@include file="../includes/localize.jsp" %>
<%@include file="../includes/init-url.jsp" %>
  1. Provide sample code with AuthenticationEndpointUtil.i18n(resourceBundle, ...)
<footer class="footer">
    <div class="container-fluid">
            <script>document.write(new Date().getFullYear());</script>
            <a href="<%=AuthenticationEndpointUtil.i18n(resourceBundle, "business.homepage")%>"
               target="_blank">
               <i class="icon fw fw-wso2"></i>
               <%=AuthenticationEndpointUtil.i18n(resourceBundle, "Inc")%>
            </a>
            . <%=AuthenticationEndpointUtil.i18n(resourceBundle, "All.rights.reserved")%>
        </p>
    </div>
</footer>

[1] - https://is.docs.wso2.com/en/5.10.0/develop/customizing-identity-server-uis/#step-4-edit-the-existing-header-and-footer-content

isuruhettiarachchi avatar Jan 20 '21 06:01 isuruhettiarachchi

Should be fixed for IS 5.11 and 6.0.0

nilminiwso2 avatar Jul 01 '22 23:07 nilminiwso2