Jump to content

Email.inc.php Nightmare


Guest cwalter

Recommended Posts

Guest cwalter

Hi

Is anyone able to assist with a problem i am having changing the email language file. I have tried to change the text via the admin panel and after i save the changes all the email i have altered fill up with the following code "<br/>" They appear on every line and corrupt the emails that are sent out.

I have tried the revert option and it did not fix it, i have cleared the cache and tried the revert option and it did not fix it. I have cleared the cache and uploaded a fresh copy of the email.inc.php file and still has not fixed it...

Now i am stuck

Can anyone help?

Thanks

Link to comment
Share on other sites

Guest ManuelC

Hi

Is anyone able to assist with a problem i am having changing the email language file. I have tried to change the text via the admin panel and after i save the changes all the email i have altered fill up with the following code "<br/>" They appear on every line and corrupt the emails that are sent out.

I have tried the revert option and it did not fix it, i have cleared the cache and tried the revert option and it did not fix it. I have cleared the cache and uploaded a fresh copy of the email.inc.php file and still has not fixed it...

Now i am stuck

Can anyone help?

Thanks

Same problem! Everything's a mess. "<br />" -s everywhere. The shop sucks that way. I thought if i'm BUYING a webshop for $180, i will get VALUE for my money and real support.

Can i, or should i ask my money back?!

Link to comment
Share on other sites

Guest esthervdwal

Same here I allready reported it as a bug. They said it is resolved in next version? That's what I understood.

It looks very unprofessional indead... :sleep:

Link to comment
Share on other sites

Guest ManuelC

Same here I allready reported it as a bug. They said it is resolved in next version? That's what I understood.

It looks very unprofessional indead... :sleep:

Just upgraded to version 4.1.1

Got this error with the NEW update! 4.0.3 had no such "<br />" -s.

It had another email bug that's why the cubecart support told me to upgrade to 4.1.1.

It took me 8 hours to get everything in it's place again, then i found out about the fin emails.

Link to comment
Share on other sites

By chance are you using Vista? I had this problem when I started using my Vista laptop though had never had it before. I solved it by replacing the </br> tags with a carriage return call %0d%0a and it works perfectly.

I'm not using 4, but thought I might put this out their as a possible solution. I just did a find/replace to do the above and no more problems.

Link to comment
Share on other sites

Guest hennaboy

You upgraded from 4.0.3 to 4.1.1? Just making sure im reading everything correctly.

I dont have the 4.0.3 on my system anymore to check the files to see what changes there are in the email.inc file

Im wondering if a quick fix would be to upload the email.inc from the 4.0.3 version over the file supplied in 4.1.1

It may (take a backup first) resolve the problem until the developers sort it out.

A suggestion it may or may not work

Link to comment
Share on other sites

Guest ManuelC

You upgraded from 4.0.3 to 4.1.1? Just making sure im reading everything correctly.

I dont have the 4.0.3 on my system anymore to check the files to see what changes there are in the email.inc file

Im wondering if a quick fix would be to upload the email.inc from the 4.0.3 version over the file supplied in 4.1.1

It may (take a backup first) resolve the problem until the developers sort it out.

A suggestion it may or may not work

Yes i upgraded 4.0.3 to 4.1.1.

I already checked the old version of email.inc, it's NOT in the email.inc. The problem occurs, when you modify the email messages. And it's useless to click on "Revert", if you save the templates, the next time you open the templates page the <br> -s back again.

Can the error be in the SQL- database or what?

Link to comment
Share on other sites

Guest ManuelC

You upgraded from 4.0.3 to 4.1.1? Just making sure im reading everything correctly.

I dont have the 4.0.3 on my system anymore to check the files to see what changes there are in the email.inc file

Im wondering if a quick fix would be to upload the email.inc from the 4.0.3 version over the file supplied in 4.1.1

It may (take a backup first) resolve the problem until the developers sort it out.

A suggestion it may or may not work

Yes i upgraded 4.0.3 to 4.1.1.

I already checked the old version of email.inc, it's NOT in the email.inc. The problem occurs, when you modify the email messages. And it's useless to click on "Revert", if you save the templates, the next time you open the templates page the <br> -s back again.

Can the error be in the SQL- database or what?

Yes, the error IS IN THE SQL DATABASE! But during the CC admin session, by saving the email emplates it overwrites the "CubeCart_lang" table's "langArray" block with this text:

a:1:{s:5:"email";a:35:{s:14:"coupon_subject";s:22:"Your gift certificate!";s:11:"coupon_body";s:426:"Dear {RECIP_NAME},<br />

<br />

{SENDER_NAME} has sent you a gift voucher worth {AMOUNT} which can be redeemed against any goods in our store! <br />

<br />

~~~~~~~~~~~~~~~~~~~~~~~~~~<br />

Message: (from {SENDER_NAME} <{SENDER_EMAIL}>)<br />

{MESSAGE}<br />

~~~~~~~~~~~~~~~~~~~~~~~~~~<br />

Voucher Code: {COUPON}<br />

~~~~~~~~~~~~~~~~~~~~~~~~~~<br />

<br />

Why not spend it now?<br />

<br />

Goto: {STORE_URL}";s:14:"downloads_body";s:427:"Dear {RECIP_NAME},<br />

<br />

Thank you for your order no: {ORDER_ID} placed on {ORDER_DATE}<br />

<br />

Below are the links you need to access the digital products you have ordered.<br />

<br />

IMPORTANT these links will expire on {EXPIRE_DATE} and you have {DOWNLOAD_ATTEMPTS} attempts to download them. If you have any problems please contact us stating your order number.<br />

<br />

~~~~~~~~~~~~~~~~~~~~~~~~~~";s:16:"downloads_body_2";s:100:"{PRODUCT_NAME}<br />

DOWNLOAD LINK:<br />

{DOWNLOAD_URL}<br />

<br />

~~~~~~~~~~~~~~~~~~~~~~~~~~";s:17:"downloads_subject";s:28:"Downloads Access: {ORDER_ID}";s:17:"order_breakdown_1";s:946:"Dear {RECIP_NAME},<br />

<br />

Thank you for your order no: {ORDER_ID} placed on {ORDER_DATE}<br />

<br />

The transaction was successful and we will ship your goods at the first possible opportunity (if applicable).<br />

.

.

.

Modifying this text (removing the "<br />" -s from this) is not the solution, in that case the system sends blank emails.

Link to comment
Share on other sites

Guest esthervdwal

I think this is a major problem that should be solved very soon! This is very unprofessional to your custumors and also the url's in the e-mail do not work because of the < /br> in it. I had a lot of questions about that from customers....so please anyone, fix this!

Release at least a new version today so that's solved.

Link to comment
Share on other sites

I believe this is covered in the bug tracker and has been dealt with for 4.1.2
Yes it is already covered.

For anyone having such issue using 4.1.0, 4.1.1 please do this fix

open YOUR-ADMIN-FOLDER/sources/filemanager/language.inc.php

SEARCH FOR

		#	$saved[$def][$key] = htmlspecialchars(stripslashes($value), ENT_COMPAT, 'UTF-8');

		#	$saved[$def][$key] = stripslashes($value);

			$saved[$def][$key] = nl2br(html_entity_decode(stripslashes($value)));




REPLACE WITH
			$string = html_entity_decode(stripslashes($value));

			if (!strstr($_POST['identifier'], 'email.inc.php')) {

				$string = nl2br($string);

			}

			$saved[$def][$key] = $string;

Link to comment
Share on other sites

Same problem with my code symbol in email, tres desagreale.

It answered my support that would be corrected at the next version pending on doing what ..... Not too pretty for our customers as email.

I change the codes as mentioned but there is no change in <br> in emails.

magi

Link to comment
Share on other sites

Same problem with my code symbol in email, tres desagreale.

It answered my support that would be corrected at the next version pending on doing what ..... Not too pretty for our customers as email.

I change the codes as mentioned but there is no change in <br> in emails.

magi

Code I posted above DOES NOT remove already created <br /> but prevents to create any new ones. If you would lilke to remove <br /> you can do it:

1) manually

2) using this code replacement instead of one above for temporary

$string = html_entity_decode(stripslashes($value));

if (!strstr($_POST['identifier'], 'email.inc.php')) {

$string = nl2br($string);

} else {

$string = str_replace("<br />","",$string);

}

$saved[$def][$key] = $string;

Run it - it removes any <br /> then delete red marked.

Anyway delete email template lang matter from database is the best because there could exist more mess than expected.

Link to comment
Share on other sites

  • 4 weeks later...

I just downloaded 4.1.1 today and updated my store. The code in that section of that file is different already and looks like neither the before or after code you gave. Is it already fixed? Are the updates daily snapshots?

I haven't tried changing the email text so I don't know if I would have this problem but I'd like these answers before I do.

Link to comment
Share on other sites

I just downloaded 4.1.1 today and updated my store. The code in that section of that file is different already and looks like neither the before or after code you gave. Is it already fixed? Are the updates daily snapshots?

I haven't tried changing the email text so I don't know if I would have this problem but I'd like these answers before I do.

You should SEARCH FOR

		#	$saved[$def][$key] = htmlspecialchars(stripslashes($value), ENT_COMPAT, 'UTF-8');

		#	$saved[$def][$key] = stripslashes($value);

			$saved[$def][$key] = nl2br(html_entity_decode(stripslashes($value)));

You'll find it around line 41...

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...