vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   weird html in phrase (https://vborg.vbsupport.ru/showthread.php?t=312886)

Chadi 07-11-2014 01:24 AM

weird html in phrase
 
I updated the phrase "notify" to convert it to a nice html email notification instead of the ancient plain text format.

Here's the very weird thing... I tested it several times today and it worked fine. I received the full html output in mobile and desktop mail clients. That was only 20-30 minutes ago, at least 5-10 tests all good. Now, another member replied to a thread I'm subscribed to and it showed the full code in plain text in the email instead. I'm baffled why it worked before and suddenly now? I did not make any new updates since it was working fine before too.

The code for phrase "notify"

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Talk Jesus Forums</title>
  </head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
  <tbody>
      <tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
        <table border="0" cellspacing="0" cellpadding="0"><tbody>
          <tr><td align="center" width="680" style="padding: 10px">
            <a href="http://www.talkjesus.com" target="_blank">
              <img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
          </td></tr>
        </tbody></table>
      </td></tr>
<tr><td style="padding: 20px" align="center">
  <table border="0" cellpadding="0" cellspacing="0"><tbody>
  <tr>
    <td width="400"  style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
      <div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
          <p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" width="50" /></p>
          <p  style="text-decoration: none; color: #008fd5;" target="_blank">
          Dear $touser[username],<br>
          <p style="text-decoration: none; color: #68757e; font-size: 16px" target="_blank">
            <span style="text-decoration: none; color: #E66B1B;">$bbuserinfo[username]</span> has just replied to a discussion you have subscribed to entitled <strong>"$threadinfo[prefix_plain]$threadinfo[title]"</strong></p>
            <p style="text-decoration: none; color: #68757e; font-size: 16px; font-weight: 600; text-align:left" target="_blank">the messsage...</p>
          <p style="text-decoration: none; color: #68757e; font-size: 14px; border-top: 1px solid #89949b; border-bottom: 1px solid #89949b; padding: 5px; text-align:left" target="_blank">"$pagetext"</p>
          <p>to reply back <a href="$threadlink" style="text-decoration: none; color: #008fd5;" target="_blank">click here</a></p></div>
    </td>
  </tr>
  </tbody></table>
</td></tr>
    <tr><td style="background-color: #f9f9f9; color: #89949b" align="center">
     
        <p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
          <a href="http://www.talkjesus.com"  style="text-decoration: none; color: #008fd5;" target="_blank" target="_blank">
          Home</a>
          &nbsp;|&nbsp;
          <a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;" target="_blank">Facebook</a>
          &nbsp;|&nbsp;
          <a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;" target="_blank">Twitter</a>
        </p>
      <p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
        Thank you for being a part of Talk Jesus</p>
    </td></tr>
  </tbody>
</table>
</body>
</html>


ForceHSS 07-11-2014 01:42 AM

Line 23, Column 101: required attribute "ALT" not specified
Line 23, Column 101: NET-enabling start-tag requires SHORTTAG
<p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" width="50" /></p>
Line 24, Column 69: there is no attribute "TARGET"
<p style="text-decoration: none; color: #008fd5;" target="_blank">
Line 38, Column 117: duplicate specification of attribute "TARGET"
<a href="http://www.talkjesus.com" style="text-decoration: none; color: #008fd5;" target="_blank" target="_blank">

Chadi 07-11-2014 02:17 AM

I think that may have worked, thanks :)

ForceHSS 07-11-2014 02:21 AM

happy to help

Chadi 07-11-2014 10:11 AM

Unfortunately it is not working at all. It seems like anytime I make an edit, it works first time around but not after? Doesn't make sense.

Updated code:

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Talk Jesus Forums</title>
  </head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
  <tbody>
      <tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
        <table border="0" cellspacing="0" cellpadding="0"><tbody>
          <tr><td align="center" width="680" style="padding: 10px">
            <a href="http://www.talkjesus.com">
              <img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
          </td></tr>
        </tbody></table>
      </td></tr>
<tr><td style="padding: 20px" align="center">
  <table border="0" cellpadding="0" cellspacing="0"><tbody>
  <tr>
    <td width="400"  style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
      <div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
          <p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" alt="New Reply" width="50" /></p>
          <p  style="text-decoration: none; color: #008fd5;">
          Dear $touser[username],<br>
          <p style="text-decoration: none; color: #68757e; font-size: 16px">
            <span style="text-decoration: none; color: #E66B1B;">$bbuserinfo[username]</span> has just replied to a discussion you have subscribed to entitled <strong>"$threadinfo[prefix_plain]$threadinfo[title]"</strong></p>
            <p style="text-decoration: none; color: #68757e; font-size: 16px; font-weight: 600; text-align:left">the messsage...</p>
          <p style="text-decoration: none; color: #68757e; font-size: 14px; border-top: 1px solid #89949b; border-bottom: 1px solid #89949b; padding: 5px; text-align:left">$pagetext</p>
          <p>to reply back <a href="$threadlink" style="text-decoration: none; color: #008fd5;">click here</a></p></div>
    </td>
  </tr>
  </tbody></table>
</td></tr>
    <tr><td style="background-color: #f9f9f9; color: #89949b" align="center">
     
        <p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
          <a href="http://www.talkjesus.com"  style="text-decoration: none; color: #008fd5;">
          Home</a>
          &nbsp;|&nbsp;
          <a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;">Facebook</a>
          &nbsp;|&nbsp;
          <a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;">Twitter</a>
        </p>
      <p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
        Thank you for being a part of Talk Jesus</p>
    </td></tr>
  </tbody>
</table>
</body>
</html>


Lynne 07-11-2014 03:56 PM

Some people have receiving html email turned off and thus the email will just show as text to them. Have you asked the user to check their email settings to make sure they allow html emails to be received?

This is a good place to check html - http://validator.w3.org/check

ForceHSS 07-11-2014 03:57 PM

Line 23, Column 117: NET-enabling start-tag requires SHORTTAG

alt="New Reply" width="50" /></p>

Try putting quotation marks around the value.

the Document Type (-//W3C//DTD HTML 4.01 Transitional //EN) is not in the validator's catalog
No XML declaration (e.g<? xml version="1.0"?>) could be found at the beginning of the document.

Chadi 07-11-2014 04:02 PM

Quote:

Originally Posted by Lynne (Post 2506414)
Some people have receiving html email turned off and thus the email will just show as text to them. Have you asked the user to check their email settings to make sure they allow html emails to be received?

This is a good place to check html - http://validator.w3.org/check

It's me, I'm the one receiving them fine in HTML on mobile/desktop clients and then they come in suddenly in plain code. HTML is enabled by default for me in iOS mail and Outlook 2013.

--------------- Added [DATE]1405098303[/DATE] at [TIME]1405098303[/TIME] ---------------

Quote:

Originally Posted by ForceHSS (Post 2506415)
Line 23, Column 117: NET-enabling start-tag requires SHORTTAG

alt="New Reply" width="50" /></p>

Try putting quotation marks around the value.

Are you saying to remove the end trailing slash? Confused sorry.

--------------- Added [DATE]1405099298[/DATE] at [TIME]1405099298[/TIME] ---------------

I've been using the W3 validator, no errors.

Again this is happening. I created/responded to a few threads/posts between admin/member user (test user). First few emails in proper html. Then, just now back to plain text html code. Why on earth would this happen? This makes no sense at all.

ForceHSS 07-11-2014 04:45 PM

Use the Validate by direct input http://validator.w3.org/#validate_by_input

Chadi 07-11-2014 04:54 PM

Thank you. Been using that. Only 2 warnings, which is below and not sure quite what to do from here.

Quote:

Unable to Determine Parse Mode! The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because:
  • in Direct Input mode, no MIME Media Type is served to the validator
  • the Document Type (-//W3C//DTD HTML 4.01 Transitional //EN) is not in the validator's catalog
  • No XML declaration (e.g <?xml version="1.0"?>) could be found at the beginning of the document.
  • No XML namespace (e.g <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">) could be found at the root of the document.
As a default, the validator is falling back to SGML mode.
--------------- Added [DATE]1405132517[/DATE] at [TIME]1405132517[/TIME] ---------------

Ok, tracing this down a little bit.

Here's the thing I noticed. The pmreceived phrase is working perfectly fine with the HTML code, but the notify one is still sending plain text code (even though it worked first couple times with same code). This is baffling me.

notify phrase:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Talk Jesus Forums</title>
  </head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
  <tbody>
      <tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
        <table border="0" cellspacing="0" cellpadding="0"><tbody>
          <tr><td align="center" width="680" style="padding: 10px">
            <a href="http://www.talkjesus.com">
              <img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
          </td></tr>
        </tbody></table>
      </td></tr>
<tr><td style="padding: 20px" align="center">
  <table border="0" cellpadding="0" cellspacing="0"><tbody>
  <tr>
    <td width="400"  style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
      <div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
          <p><img src="http://www.talkjesus.com/images/newsletter/collaboration-100.png" alt="New Reply" width="50"></p>
          <p  style="text-decoration: none; color: #008fd5;">
          Dear $touser[username],<br>
          <p style="text-decoration: none; color: #68757e; font-size: 16px">
            <span style="text-decoration: none; color: #E66B1B;">$bbuserinfo[username]</span> has just replied to a discussion you have subscribed to entitled <strong>"$threadinfo[prefix_plain]$threadinfo[title]"</strong></p>
            <p style="text-decoration: none; color: #68757e; font-size: 16px; font-weight: 600; text-align:left">the messsage...</p>
          <p style="text-decoration: none; color: #68757e; font-size: 14px; border-top: 1px solid #89949b; border-bottom: 1px solid #89949b; padding: 5px; text-align:left">$pagetext</p>
          <p>to reply back <a href="$threadlink" style="text-decoration: none; color: #008fd5;">click here</a></p></div>
    </td>
  </tr>
  </tbody></table>
</td></tr>
    <tr><td style="background-color: #f9f9f9; color: #89949b" align="center">
     
        <p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
          <a href="http://www.talkjesus.com"  style="text-decoration: none; color: #008fd5;">
          Home</a>
          &nbsp;|&nbsp;
          <a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;">Facebook</a>
          &nbsp;|&nbsp;
          <a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;">Twitter</a>
        </p>
      <p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
        Thank you for being a part of Talk Jesus</p>
    </td></tr>
  </tbody>
</table>
</body>
</html>

pmreceived phrase:
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Talk Jesus Forums</title>
  </head>
<body style="margin: 0; padding: 0;" dir="ltr">
<table width="100%" border="0" cellspacing="0">
  <tbody>
      <tr style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;"><td align="center" style="background-color: #43a6df;border: 0;border-bottom: 2px solid #2475ab;-webkit-box-shadow: inset 0 -2px #2475ab;box-shadow: inset 0 -2px #2475ab;">
        <table border="0" cellspacing="0" cellpadding="0"><tbody>
          <tr><td align="center" width="680" style="padding: 10px">
            <a href="http://www.talkjesus.com">
              <img src="http://www.talkjesus.com/images/metro/blue/misc/logo.png" title="Talk Jesus" style="border:0" alt="Talk Jesus" height="50" width="160"></a>
          </td></tr>
        </tbody></table>
      </td></tr>
<tr><td style="padding: 20px" align="center">
  <table border="0" cellpadding="0" cellspacing="0"><tbody>
  <tr>
    <td width="400"  style="font-size:14px; line-height: 22px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #89949b;" valign="top" align="center">
      <div style="font-size:22px; line-height: 28px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased; color: #68757e; margin-bottom: 5px;">
          <p><img src="http://www.talkjesus.com/images/newsletter/inbox-100.png" alt="New Message" width="50"></p>
          <p  style="text-decoration: none; color: #008fd5;">
          Dear $touserinfo[username],<br>
          <p style="text-decoration: none; color: #68757e; font-size: 16px">
            You have received a new private message from <span style="text-decoration: none; color: #E66B1B;">$fromusername</span>, entitled <strong>"$plaintext_title"</strong>.</p>           
          <p>To read and respond back to this message, you must
          <a href="http://www.talkjesus.com/private.php" style="text-decoration: none; color: #008fd5;">log in here</a>.</div>
    </td>
  </tr>
  </tbody></table>
</td></tr>
    <tr><td style="background-color: #f9f9f9; color: #89949b" align="center">
     
        <p style="margin: 15px; font-size:14px; line-height: 18px;font-family: 'Lucida Grande', Tahoma, sans-serif; -webkit-font-smoothing: antialiased;">
          <a href="http://www.talkjesus.com"  style="text-decoration: none; color: #008fd5;">
          Home</a>
          &nbsp;|&nbsp;
          <a href="http://www.facebook.com/talkjesus" style="text-decoration: none; color: #008fd5;">Facebook</a>
          &nbsp;|&nbsp;
          <a href="http://www.twitter.com/talkjesus" style="text-decoration: none; color: #008fd5;">Twitter</a>
        </p>
      <p style="margin: 15px 0; font-size:13px; line-height: 18px; font-family: 'Lucida Grande', Tahoma, sans-serif;">
        Thank you for being a part of Talk Jesus</p>
    </td></tr>
  </tbody>
</table>
</body>
</html>

Ran both through the W3 validator, no errors. They're also virtually almost 100% the same code, except 2 pieces which is the actual vbphrases that are different, nothing else.

Any one have an idea?


All times are GMT. The time now is 07:16 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01250 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete