Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11.3: can't download JS... #7

Closed
polx opened this issue May 2, 2019 · 8 comments
Closed

11.3: can't download JS... #7

polx opened this issue May 2, 2019 · 8 comments
Assignees
Milestone

Comments

@polx
Copy link
Contributor

polx commented May 2, 2019

Today I installed the freshly made 11.3 and pulled the onlyoffice connector.
I installed license... no trouble.
I uploaded a docx attachment and clicked on the little stack of 3 squares to edit it. I obtained the screenshot attached.

In the console:
The script from “http://10.90.0.114:8080/xwiki/bin/viewattachrev/XWikiOnlyOfficeCode/XooEdit/xwiki-onlyoffice.js” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.[Learn More]

and indeed http://10.90.0.114:8080/xwiki/bin/viewattachrev/XWikiOnlyOfficeCode/XooEdit/xwiki-onlyoffice.js shows an HTML file (choice of attachment versions) whereas it is called as a script.

paul

@polx
Copy link
Contributor Author

polx commented May 2, 2019

Screenshot 2019-05-02 at 17 07 41

@polx
Copy link
Contributor Author

polx commented May 2, 2019

This is caused by the call to the URL http://127.0.0.1:8080/xwiki/bin/downloadrev/XWikiOnlyOfficeCode/XooEdit/xwiki-onlyoffice.js?rev=1.1?cb=1556810732367 which is malformed as it has two question marks.

@polx
Copy link
Contributor Author

polx commented May 2, 2019

This is caused by https://github.com/xwikisas/application-onlyoffice-connector/blob/master/application-onlyoffice-connector-ui/src/main/resources/XWikiOnlyOfficeCode/XooEdit.xml#L155 : require(["$doc.getAttachmentURL('xwiki-onlyoffice.js')" + '?cb=' + new Date().getTime()], function (oojs) {...

I do not see a reason to keep the cb parameter.

paul

@polx
Copy link
Contributor Author

polx commented May 2, 2019

A dialogue on XWiki chat shows that this change is justified by XWIKI-15450 which was indeed deployed with 11.3.
A potential fix has been requested as XWIKI-16378 however we should also have a fix of the app.

polx added a commit that referenced this issue May 2, 2019
@polx
Copy link
Contributor Author

polx commented May 2, 2019

Branch issue-7-no-two-url-params created with a fix.
paul

@mflorea
Copy link
Contributor

mflorea commented May 2, 2019

@polx looks good.

@acotiuga
Copy link
Contributor

acotiuga commented May 3, 2019

@polx you can commit the changes from your branch.

@polx
Copy link
Contributor Author

polx commented May 20, 2019

Cool. This is merged.
Ok to release version 1.4 then?
paul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants