-
Type: Improvement
-
Status: Resolved
-
Priority: Major
-
Resolution: Feature Candidate
-
Affects Version/s: 3.0.15
-
Fix Version/s: None
-
Component/s: Web UI
-
Environment:Any environment - local, Openshift DEV and TEST, Preprod, Prod
-
Tags:
-
Browser:
We defined form layouts that are reused in view layouts of a folderish document. The embedded layout contains the <nuxeo-page-provider> and <nuxeo-results>. Since the view layout doesn't contain those elements anymore, we see errors because Web UI by default tries invoke some methods on <nuxeo-results> and <nuxeo-page-provider>.
This causes
main.bundle.js:1914 Uncaught TypeError: Cannot read properties of null (reading 'fetch')
at l._refresh (main.bundle.js:1914:2290)
at Object.j [as fn] (main.bundle.js:12654:75008)
at k (main.bundle.js:12654:70453)
at l._propertiesChanged (main.bundle.js:12654:81871)
at l._flushProperties (main.bundle.js:12654:62769)
at l._invalidateProperties (main.bundle.js:12654:79845)
at Object.defineProperty.set (main.bundle.js:12654:61177)
at l._documentChanged (main.bundle.js:1914:3778)
at Object.C [as fn] (main.bundle.js:12654:70936)
at k (main.bundle.js:12654:70453)
OR
main.bundle.js:1914 Uncaught TypeError: Cannot read properties of undefined (reading 'set')
at l._documentChanged (main.bundle.js:1914:3820)
at Object.C [as fn] (main.bundle.js:12654:70936)
at k (main.bundle.js:12654:70453)
at l._propertiesChanged (main.bundle.js:12654:81871)
at l._flushProperties (main.bundle.js:12654:62769)
at l._invalidateProperties (main.bundle.js:12654:79845)
at Object.defineProperty.set (main.bundle.js:12654:61177)
at main.bundle.js:5106:2089
at Array.forEach (<anonymous>)
at e._update (main.bundle.js:5106:2061)
Which in turn causes 404 errors, e.g. when clicking on one of the elements in the browse tree twice.
This problem currently occurs on most of the folderish documents in the Cox Manheim configuration.
We found a workaround by adding "dummy" elements in the view layout:
<nuxeo-page-provider id="nxProvider"></nuxeo-page-provider> <nuxeo-results id="results" style="display: none;"></nuxeo-results>
This avoids both errors, but would have to be added to each view layout.
It would be better to have a fix in Web UI rather than adding the workaround to many view layouts.
This is on LTS 2021 and Web UI 3.0.15.