Jump to content

RESOLVED: Email Template - Think I found a bug


Will H

Recommended Posts

I have managed to break my store again.

The Issue: Email templates generate this: 

Kind regards,

The www.Xgeeks.ca Staff

I carefully tried to edit my Default Emails Template, (Store Settings > Email Templates > Email Templates > HTML Source > "Source" button: )as I have noticed despite me picking US ENG, the default template of UK ENG shows.

This is validated by seeing the closing wording " Kind Regards ", rather than the US string  " Thank you ". I carefully manually changed the words only, not adding or deleting any spaces

I tried performing a fresh install of CubeCart with the intention of C & P the HTML source code to resolve the issue. That didnt work.

Then, without editing the "fresh copy" source at all, as soon as I hit SAVE -  it also crashed and left this error message:

HTML Content: Syntax error in template "'undefined'=== typeof _trfq || (window._trfq = []);'undefined'=== typeof _trfd && (window._trfd=[]),_trfd.push({'tccl.baseHost':'secureserver.net'}),_trfd.push({'ap':'cpsh'},{'server':'a2plcpnl0582'}) // Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support." - Unexpected ":", expected one of: "}"

I am not sure what I can do at this point to resolve the issue.

 

UPDATE: I just tried to create a new email template within CC 6.2.2, and it generates this immediately:

" <html>
<head>
    <title></title>
</head>
<body>
<p><br />
<script>'undefined'=== typeof _trfq || (window._trfq = []);'undefined'=== typeof _trfd && (window._trfd=[]),_trfd.push({'tccl.baseHost':'secureserver.net'}),_trfd.push({'ap':'cpsh'},{'server':'a2plcpnl0582'}) // Monitoring performance to make your website faster. If you want to opt-out, please contact web hosting support.</script><script src='https://img1.wsimg.com/tcc/tcc_l.combined.1.0.6.min.js'></script></p>
</body>
</html>

Will H.

 

EDIT UPDATE #2: I fixed it.

It seems my host (GoDaddy) is running analytics software on their server that is conflicting with the email templates/emails. After loading an email template, making any changes or no changes generated the same crash. This crash occurs whenever the system is asked to generate an email from the template. The admin panel hangs on white screen and never recovers.

In my "fresh copy" store, it trashed the database and added multiple " clones " of the Default Email template, I did not create..

HOW I RESOLVED: I called my hosting provider, they guided me how to turn off analytics (for now) in the main hosting screen just prior to selecting cPanel.

I wonder if other cPanel hosts would experience the same thing. LOL. Now I am not afraid to edit my email templates.

Link to comment
Share on other sites

19 hours ago, Will H said:

HOW I RESOLVED: I called my hosting provider, they guided me how to turn off analytics (for now) in the main hosting screen just prior to selecting cPanel.

I wonder if other cPanel hosts would experience the same thing. LOL. Now I am not afraid to edit my email templates.

No, I doubt it would affect anyone else - your hosting company is injecting "Monitoring" code into your website pages. Unless you specifically switched that on and knew what it was doing, that is pretty naughty !  Even looking at your current visible homepage (store in maintenance message), you still have that injected !

Link to comment
Share on other sites

Thank you for your reply. How do I get rid of it? And no - I did not OPT IN / Only upon crashing was I made aware, and chose to opt out.

I'm willing to bet that's responsible for a lot of the weird situations I have been experiencing. I would assume all of my pages are affected.

Will

Link to comment
Share on other sites

7 hours ago, Will H said:

Thank you for your reply. How do I get rid of it? And no - I did not OPT IN / Only upon crashing was I made aware, and chose to opt out.

I'm willing to bet that's responsible for a lot of the weird situations I have been experiencing. I would assume all of my pages are affected.

No idea but from your previous answer, you said that they had told you how to turn it off ?  Still appears to be there !  Personally, I think godaddy doing that without your permission is extremely bad and I would recommend moving away from them

Link to comment
Share on other sites

1 hour ago, havenswift-hosting said:

No idea but from your previous answer, you said that they had told you how to turn it off ?  Still appears to be there !  Personally, I think godaddy doing that without your permission is extremely bad and I would recommend moving away from them

Yes I do agree. I am assuming the pages were injected upon 1st load, and therefor "currupted" from my point of view. I have not made any scripting changes so would beyond compare allow me to compare files and "weed out" the bad code?

 

Secondly, I have started setting up my Web server environment on my Windows PC. I have decided to use a fresh copy of cubecart, create a new database and import my info and see where that takes me locally. then my plan is to upload my site, now that analytics are turned off, they won't be re-injected.

Sounds good- we'll see.

Thank you;

 

Will

Link to comment
Share on other sites

14 hours ago, Will H said:

Yes I do agree. I am assuming the pages were injected upon 1st load, and therefor "currupted" from my point of view. I have not made any scripting changes so would beyond compare allow me to compare files and "weed out" the bad code?

now that analytics are turned off, they won't be re-injected.

I would doubt very much that they have injected code into files - that would be much worse and almost impossible to do automatically without causing major problems more serious than you are seeing. 

Link to comment
Share on other sites

If the Offline Contents were edited, then the Save button clicked, that content was POSTed just like any other content you have been having problems with -- the email templates, specifically -- but perhaps with other content such as product descriptions, and the Homepage.

Link to comment
Share on other sites

4 hours ago, Will H said:

I guess I am confused because you confirmed you could see code injected even in my offline page?

Without knowing the mechanism they are using to insert this code it isn’t possible to say conclusively.  It could have been injected into the files (extremely unlikely but easily checked by doing file comparison), it could have been injected into documents as Brian says (again easily checkable by looking at the content of various documents including the offline page) or it could be done dynamically.

Whichever way, if I was you, I would look to move my web hosting away from them ASAP - a Hosting company should never mess with your site in this way.

Ian

Link to comment
Share on other sites

1 hour ago, havenswift-hosting said:

Without knowing the mechanism they are using to insert this code it isn’t possible to say conclusively.  It could have been injected into the files (extremely unlikely but easily checked by doing file comparison), it could have been injected into documents as Brian says (again easily checkable by looking at the content of various documents including the offline page) or it could be done dynamically.

Whichever way, if I was you, I would look to move my web hosting away from them ASAP - a Hosting company should never mess with your site in this way.

Ian

Certainly agree. Although, the price was right! (I'm a cheepo!).

$2.49 USD / month, inluding Domain registration. $84. USD for 3 years, done, out the door. I'll hopefully grow out of them quickly; in the meantime I'm digging in! (And I have "opted out" permanently from their analytics.

Will

Link to comment
Share on other sites

Pay peanuts and get monkeys though ! While cheap hosting can seem attractive it will always cost you lots of extra money in the long run.  Another point is that you shouldnt ever have to opt out of anything like that especially when it is as intrusive as this is and causes so many problems.  Good luck !

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...