Uploaded image for project: 'AdMaxLocal'
  1. AdMaxLocal
  2. AML-1700

Merchant UI Logo Image Won't Load If There's A Hyphen In Realm Name

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0
    • Fix Version/s: All Time Backlog
    • Component/s: Merchant UI
    • Labels:
      None
    • Environment:

      Merchant UI 2.1, build #15

    • Sprint:
      High Priority

      Description

      If the subdomain of a subscriber contains a hyphen, the logo image for the merchant UI isn't loading.

      To reproduce, create a realm with a hyphen, e.g. "ntt-tp", and following the skinning process as outlined here:
      http://kbase.ri.thesearchagency.com/index.php/AdMax_Local_-_Merchant_UI

      The logo will not appear on the login page, nor on the application page once logged in.

      This is due to the image.jsp file having a "filterRealm" method that makes use of a regex pattern that isn't allowing hyphens in the domain name. The offending line is:

      Pattern theRealmFilter = Pattern.compile("(?:(?:[\\w]{1,}\\.){0,}[\\w]{1,})$");

      To fix the code, change the line to:

      Pattern theRealmFilter = Pattern.compile("(?:(?:[\\w-]{1,}\\.){0,}[\\w-]{1,})$");

      Workaround prior to code fix:

      Do these steps on the tomcat server. Note this example assumes the realm name is "ntt-tp", and it's setting up an alias called "ntttp" that the image.jsp file will be told to use. Obviously change those names to fit the situation.

      1) cd /usr/local/tsa/ui/com/thesearchagency/admaxlocal/merchant/client/realms/

      2) sudo ln -s ntt-tp ntttp

      3) sudo vi ntt-tp/css/overrides.css

      4) Append &realm=ntttp to the end of the image url
      .aml-header .aml-headerLogo .aml-headerLogoImage,
      .aml-loginHeader .aml-loginHeaderLogo .aml-loginHeaderLogoImage
      {
      background: url('image.jsp?img=logo.png&realm=ntttp') no-repeat center center transparent;

      5) Save file

      This will fool the image.jsp file into using a realm name that doesn't have a dash in it.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mholly Mike Holly
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: