Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 04-29-2024 12:25:20

KryptSupport
Member
Registered: 04-29-2024
Posts: 77

Font Error

NOTE: This post was created on 2022-10-30 on the Kryptronic eCommerce Community facebook page, which has been replaced with this forum.  All facebook support content was migrated into this forum in April 2024.

Graham:

I have just found that, following my update from 9.0.3 to 9.2, all the text in contact messages and Order Confirmation emails (both internal and external) appear in a miniscule font.
The only changes I made to the mail skin were from < html > to < html lang='en' > as detailed in the upgrade instructions.
How do I fix this?

Kryptronic:

Check the MailMessage skin.php file in your skin directory for any syntax errors. I believe that is where the issue is.

Graham:

I have run it through an online PHP error checker and it says that no issues were found.
<?php
$title = $this->xhtml_encode($this->globals('core_mail.subject'));
$CORE_File =& $this->quick_object('CORE_File','core');
$mailcss = $CORE_File->read($this->globals('core.path_public') . '/media/skins/css/minimal.min.css');
if ((!($this->isError($mailcss))) && (!(empty($mailcss)))) {
while (preg_match('/\/\*.*?\*\//s',$mailcss)) {$mailcss = preg_replace('/\/\*.*?\*\//s','',$mailcss);}
while (preg_match('/[5|2|52]/s',$mailcss)) {$mailcss = preg_replace('/[5|2|52]/s','',$mailcss);}
while (preg_match('/ /s',$mailcss)) {$mailcss = preg_replace('/ /s',' ',$mailcss);}
} else {
$mailcss = '';
} // End of if statement.
// Because this is a mail skin, the CSS information for this skin is
// embedded in the skin itself. This CSS information needs to be
// here rather than in another file due to the way mail user agents
// display XHTML emails.
// The following code can be used to attach media (images) to the email
// message generated by this skin. Add a new line for each image
// you would like to attach. Make sure the image exists in the
// {PUBLIC}/skins/MailMessage/media directory. Uncomment to use.
//
// $this->append_global_array('core_mail.include_media','image1.png');
// $this->append_global_array('core_mail.include_media','image2.png');
$logourl = $this->globals('core.url');
$logourl .= '/media/skins/logos/' . $this->globals('core_settings.core.skins_maillogo');
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir, noindex, follow" />
<meta name="generator" content="Kryptronic Software" />
<title><?php print $title; ?></title>
<style type="text/css" media="all">
<?php print $mailcss; ?>
</style>
</head>
<body class="kwrap">
<div id="kcontentmail" class="kwrap">
<?php if (!($this->globals('core_mail.suppress_logo'))) { ?>
<div class="kbotmarginfull"><img src="<?php print $logourl; ?>" alt="Logo" class="kimgnicecenter" /></div>
<?php } ?>
<core_mail:content />
</div>
</body>
</html>

Kryptronic:

Try replacing line 11 (I think):
while (preg_match('/[5|2|52]/s',$mailcss)) {$mailcss = preg_replace('/[5|2|52]/s','',$mailcss);}
with:
while (preg_match('/[\015|\012|\015\012]/s',$mailcss)) {$mailcss = preg_replace('/[\015|\012|\015\012]/s','',$mailcss);}
That should do the trick.

Graham:

Kryptronic Ok, that seems to have worked.

Offline

 

Board footer