Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1333

Fix layout loading when locally serving Web UI with symlinked Elements

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Tooling
    • Team:
      UI
    • Sprint:
      UI - 2021-08, UI - 2021-09, UI - 2021-10, UI - 2021-11, UI Cooldown - 2021-12, UI Cooldown - 2021-13

      Description

      When locally serving Web UI with a symlinked checkout of Elements, some dynamically loaded layouts fail to load. This is mainly caused by the path resolution of the symlinks, resulting in malformed urls. Some elements rely on a strategy that uses the parent element's importPath, with a fallback on their own importPath (e.g. <nuxeo-document-layout>). This only works when the (direct) parent element is a Web UI element:

      • Document layouts: <nuxeo-document-layout> is inside <nuxeo-document-form-layout> (and other similar Web UI elements).
      • Drawer search forms: <nuxeo-search-form-layout> is inside <nuxeo-search-form>.

      However, this is not always the case:

      • Drawer search results: <nuxeo-search-results-layout> is inside <template is=dom-if> inside <nuxeo-results-view>.
      • Picker's form and results layouts: both inside <nuxeo-results-view>, with the results inside a <template is=dom-if>.

      Breaking the view layout is as easy as: In <nuxeo-document-view>, wrap the <nuxeo-document-layout> with a <template is=dom-if if="[[iEvaluateAsTrue]]"> and layout will 404.

      This is already visible in the user management section: create and edit layouts are not working.

      After the search layouts were moved from Web UI to Elements (WEBUI-173 & ELEMENTS-1311) this problem was highlighted due to the search results layouts failing to load.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: