Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-13032

Error pages have javascript errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.8-SNAPSHOT
    • Fix Version/s: 5.8.0-HF01, 5.9.1
    • Component/s: Ergonomy & UX

      Description

      When clicking on "Show error context dump" or "Show error stacktrace", we have the following error:

      Uncaught TypeError: Cannot read property 'style' of null 
      

      This is true for both:

      • nuxeo_error.jsp
      • nuxeo_error_security.jsp

      This is cause by the following js:

          function toggleError(id) {
            var style = document.getElementById(id).style;
            if ("block" == style.display) {
              style.display = "none";
              document.getElementById(id + "Off").style.display = "inline";
              document.getElementById(id + "On").style.display = "none";
            } else {
              style.display = "block";
              document.getElementById(id + "Off").style.display = "none";
              document.getElementById(id + "On").style.display = "inline";
            }
          }
      

      There are no such elements document.getElementById(id + "Off") or document.getElementById(id + "On").

      Thee code should simply be:

          function toggleError(id) {
            var style = document.getElementById(id).style;
            if ("block" == style.display) {
              style.display = "none";
            } else {
              style.display = "block";
            }
          }
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: