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

Context not set correctly when navigating back to dashboard after workflow completion

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.10
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Web UI

      Description

      When completing a workflow task, Web UI updates the tasks list and does a refresh, which will browse to the last document you navigated (navigating to a task which displays a preview of the document doesn't count), or go to the dashboard if there is no record of a last document. When landing back at the dashboard, the context is not set correctly, resulting in relative urls causing 404 errors. This includes favicons (e.g. /nuxeo/images/touch/favicon-16x16.png which should be /nuxeo/ui/images/touch/favicon-16x16.png), and any other assets that may defined on a custom dashboard e.g. images such as <img src="images/asset.jpg"/> become /nuxeo/images/asset.jpg instead of /nuxeo/ui/images/asset.jpg

      I noticed that window.location.pathname = /nuxeo/ui when navigating back to the dashboard, when usually it is /nuxeo/ui/ which may explain why the urls are resolved relative to /nuxeo instead of /nuxeo/ui, perhaps?

      Custom dashboard images can be "fixed" (worked around) by using absolute pathnames e.g.

      <img src="[[_getImageUrl('asset.jpg')]]"/>
      ...
            _getImageUrl: function(name) {
              if (name) {
                var base = window.location.pathname;
                // Trim possible trailing slash
                if (base.endsWith('/')) {
                  base = base.substr(0, base.length-1);
                }
                return base + "/images/" + name;
              }
            },
      
      

      but the favicons (in login.jsp and ui/index.jsp) are not configurable through Studio.

      The context (e.g. String context = request.getContextPath(); in login.jsp) needs to be fixed.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 20 minutes
                20m