Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Office file viewer not working Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
birender
Newbie
Newbie
Avatar

Joined: 20 August 2019
Location: India
Online Status: Offline
Posts: 18
Posted: 29 September 2019 at 11:36pm | IP Logged Quote birender

Dear Developers, In latest webmail pro when cliked on view link its not opening office files in office viewer throwing error

We can't process this request
An error occurred
We're sorry, but for some reason we can't open this for you.
Learn more

https://view.officeapps.live.com/op/errorpage.htm?llcc=en-GB
Back to Top View birender's Profile Search for other posts by birender
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6066
Posted: 29 September 2019 at 11:59pm | IP Logged Quote Igor

Hello,

By default, WebMail Pro uses online viewer from Microsoft, but you can try using the viewer from Google instead which might work better in your case. To switch to it, locate data/settings/modules/OfficeDocumentViewer.config.json file and set ViewerUrl to:

Code:
"https://docs.google.com/viewer?embedded=true&url="


--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
birender
Newbie
Newbie
Avatar

Joined: 20 August 2019
Location: India
Online Status: Offline
Posts: 18
Posted: 30 September 2019 at 12:08am | IP Logged Quote birender

Hi found a wired problem by checking the url its not taking the domain in the url its just takes at

https://view.officeapps.live.com/op/view.aspx?/%3Fmail-attachment%2FdiJk11xcEuiZyAwbtRURCmeSX1Zwxxxxxxxxxxxxxxx

but if i add domain in the url then its opening how its possible domain is skiped in url ...?

https://view.officeapps.live.com/op/view.aspx?=https://mail.domain.com/webmail/%3Fmail-attachment%2FdiJk11xcEuiZyAwbtRURCmeSX1Zw

Igor wrote:
Hello,

By default, WebMail Pro uses online viewer from Microsoft, but you can try using the viewer from Google instead which might work better in your case. To switch to it, locate data/settings/modules/OfficeDocumentViewer.config.json file and set ViewerUrl to:

Code:
"https://docs.google.com/viewer?embedded=true&url="


--
Regards,
Igor, Afterlogic Support
Back to Top View birender's Profile Search for other posts by birender
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6066
Posted: 30 September 2019 at 12:40am | IP Logged Quote Igor

Interesting, I've asked the developers to take a look.

Meantime, you can adjust the module code in modules/OfficeDocumentViewer/Module.php file:

Code:
\header('Location: ' . $sViewerUrl . urlencode($_SERVER['HTTP_REFERER'] . '?' . $sEntry .'/' . $sHash . '/' . $sAction));


and replace it with something like:

Code:
\header('Location: ' . $sViewerUrl . urlencode('https://mail.domain.com/webmail/?' . $sEntry .'/' . $sHash . '/' . $sAction));


to see if it works for you that way. Thank you.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
birender
Newbie
Newbie
Avatar

Joined: 20 August 2019
Location: India
Online Status: Offline
Posts: 18
Posted: 30 September 2019 at 12:52am | IP Logged Quote birender

Hi i updated in data/settings/modules/OfficeDocumentViewer.config.json as

https://view.officeapps.live.com/op/view.aspx?=https://mail.domain.com/webmail/

this is simple as modules/OfficeDocumentViewer/Module.ph will be keep replaced during upgrade process.

working now instead of modules/OfficeDocumentViewer/Module.php file.



Igor wrote:
Interesting, I've asked the developers to take a look.

Meantime, you can adjust the module code in modules/OfficeDocumentViewer/Module.php file:

Code:
\header('Location: ' . $sViewerUrl . urlencode($_SERVER['HTTP_REFERER'] . '?' . $sEntry .'/' . $sHash . '/' . $sAction));


and replace it with something like:

Code:
\header('Location: ' . $sViewerUrl . urlencode('https://mail.domain.com/webmail/?' . $sEntry .'/' . $sHash . '/' . $sAction));


to see if it works for you that way. Thank you.

--
Regards,
Igor, Afterlogic Support
Back to Top View birender's Profile Search for other posts by birender
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6066
Posted: 30 September 2019 at 12:57am | IP Logged Quote Igor

Oh, that's a good idea indeed, thanks for letting us know.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide