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

Comments

@polx
Copy link

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

This comment has been minimized.

Copy link
Author

commented May 2, 2019

Screenshot 2019-05-02 at 17 07 41

@polx

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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 pushed a commit that referenced this issue May 2, 2019
Paul Libbrecht
@polx

This comment has been minimized.

Copy link
Author

commented May 2, 2019

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

@mflorea

This comment has been minimized.

Copy link
Collaborator

commented May 2, 2019

@polx looks good.

@acotiuga

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

@polx you can commit the changes from your branch.

@polx

This comment has been minimized.

Copy link
Author

commented May 20, 2019

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

@acotiuga acotiuga modified the milestones: 1.13.9, 1.3.9 Aug 19, 2019

@acotiuga acotiuga closed this Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.