Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Bug with external image printing Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
tigertech
Newbie
Newbie


Joined: 21 November 2019
Online Status: Offline
Posts: 23
Posted: 09 December 2022 at 1:46pm | IP Logged Quote tigertech

A customer of ours reported the following problem. If you:

- receive a message that contains external images;
- choose "Always show pictures in messages from this sender";
- logout of webmail;
- log back in again; and
- view that same message

... then the external images in that message will show in the browser when you view the message, but will NOT show if you use the three-dot menu to "Print" the message.

I tracked this problem down to a bug in the function "CMessageModel.prototype.getDomText = function (sAppPath, bForcedShowPictures)".

In the initial non-print view, when that function is called, the

Code:
if (this.$text === null


... evaluates to true, so the code eventually reaches

Code:
if (bForcedShowPictures && this.isExternalsShown() || this.isExternalsAlwaysShown())


... to call

Code:
this.showExternalPictures()


But when the function is called a second time for the print view, the initial

Code:
if (this.$text === null


... evaluates to false, so it skips the entire code block and can never call

Code:
this.showExternalPictures()


When I experimentally patched the function by making this code run all the time, regardless of whether "this.$text" is already set, it fixes it:

Code:
if (bForcedShowPictures && this.isExternalsShown() || this.isExternalsAlwaysShown())
{
        this.showExternalPictures();
}


Back to Top View tigertech's Profile Search for other posts by tigertech
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 12 December 2022 at 2:06am | IP Logged Quote Igor

I have forwarded this information to the developers. Thank you!

--
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