-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.0.x
-
Component/s: WOPI
-
Release Notes Summary:When using the WOPI addon, the related button is now displayed on first load for a document
-
Tags:
-
Backlog priority:700
-
Sprint:UI COOLDOWN - 2023-7, UI - 2023-8
-
Story Points:3
Steps to reproduce
- install the Nuxeo WOPI addon :
nuxeoctl mp-install nuxeo-wopi
- Set the WOPI properties in nuxeo.conf (the values are not important to reproduce)
nuxeo.jwt.secret=xxx nuxeo.wopi.discoveryURL=https://onenote.officeapps.live.com/hosting/discovery nuxeo.wopi.baseURL=https://tech.com/nuxeo
- Log in as Administrator
- Navigate to the personal workspace
- Upload a .docx file
- Do a refresh of the page
- Observe that the WOPI button is not displayed among the blob actions <== this is the bug
- Navigate to the parent
- Navigate back to the document
- Observe that now the WOPI button is displayed among the blob actions
Analysis:
After doing a refresh, the "wopi" value is not passed to the "Enrichers-Blob" header => it's causing the bug
The "wopi" value is added by nuxeo-wopi.bundle.js.
const a = window.Nuxeo || {}; a.UI = a.UI || {}, a.UI.config = a.UI.config || {}, a.UI.config.enrichers = a.UI.config.enrichers || {}, a.UI.config.enrichers.blob = a.UI.config.enrichers.blob || [], a.UI.config.enrichers.blob.push("wopi");
However it seems that this code is executed too late (= after the call to compute the enrichers)
From main.bundle.js:
_loadDocument(e) { return this.loading = !0, this.docId = e.uid, this.docPath = e.path, this.$.doc.headers = this._computeHeaders(), this.$.doc.enrichers = this._computeEnrichers(),
1.
|
QA-task | Resolved | nisha.roy@contractors.onbase.com |