News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[solved] Email source code broken in v3.0.17 with Joomla 3.6.2

Started by gba, September 20, 2016, 14:03:52 PM

Previous topic - Next topic

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

gba

I did replace the files - nothing changed.

Quote from: gba on September 22, 2016, 14:26:37 PM
Why are the LFs not replaced by CRLFs in my updated installation?
I am assuming, that during email body generation no CRLF is found in the source code as there are LFs, only. So the body content is stripped by CRLFs.
The right behaviour would be, that the LFs of the template files are replaced by CRLFs. This way the clear full package installation seems to work.

So, at which place in the VM source code the LFs of the template files should be replaced with CRLFs for the email body?
Maybe I can find the source of the issue in my updated installation in this direction...

Kind regards,
Gerald

GJC Web Design

no where afaik - its just a simple template

emails are produced in the VM FE helpers/shopfunctionsf.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

I think you use a template override for the emails.
Or you edited the file per ftp and so the updater was not able to override the files.

The emails are generated in shopfunctionsf, but use for rendering "normal" views.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gba

Hi!

Thank you for your dedication to this thread.

Above I already stated, that I am using no overrides. For this reason I actually do get emails in VM native layout - just broken, due to the LFs in the email body.
And I did not edit any VM template file. Furthermore to be totally sure I even renamed the 'tmpl' directory and uploaded the original 'tmpl' directory from the VM 3.0.18 core pack via FTP. So the template files really should be virgin :)

Please help me to find out, why the LFs remain in the email body, although they should be CRLFs.

Kind regards,
Gerald


GJC Web Design

I think your being unrealistic here.. no one else reports this problem so by definition the problem is yours...

We have suggested all we can think of .. next step is if u don't have the skills to go further you employ someone who has.. 
What other help apart from all the above do u expect to receive ?  We don't know what the problem is on your install.

Maybe someone else knows...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

Answers are usually forthcoming if somebody else has seen the same issue - if we have never seen it on one of ours or a client's site then we cannot advise.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

gba

Hi!

Thank you for your good will.
I already opened a VM ticket to get paid help on this issue - but I did not get it there. So I hoped, someone here in the forum could help me.

In the meanwhile I found out, that the text, I stored in email footer field of VM vendor ("vendor_letter_footer_html" in option=com_virtuemart&view=user&task=editshop) is returned with "
"s instead of LFs. This seems to break the whole thing.
My workaround:
Before I echo the email footer text in the mail_html_footer.php file, I replace all "
"s with "\n"s:$ftrHTML = $this->replaceVendorFields($this->vendor->vendor_letter_footer_html, $this->vendor);
$ftrHTML = str_replace('
',"\n",$ftrHTML);
echo $ftrHTML;
This way the order email sourcecode comes out allright.

What I still don't know is:
Why does $this->replaceVendorFields($this->vendor->vendor_letter_footer_html, $this->vendor) return a string containing these "
"s in my updated installation, and with VM 3.0.12 it did not?

Kind regards,
Gerald

gba

Hi!

I think I found the problem now:
I had prepared some HTML code for the invoice/e-mail footer and copied that code to the vendor_letter_footer_html field.
That seems to cause some crash in VM - also in the clear fullpackage installation.
And there is no matter, if the lines end with CRLF or just with LF in the code editor (in my case NP++).
VM really should not crash, just because the user pastes texts into its fields.

Kind regards,
Gerald

Milbo

#25
Quote from: gba on September 27, 2016, 17:19:18 PM
I already opened a VM ticket to get paid help on this issue - but I did not get it there. So I hoped, someone here in the forum could help me.
This is not true. I just directly said it will cost per hour and there is no guarantee that I find the reason and that I anyway answer here in the forum for free, when I have an idea.

And the problem with your pasted text is the configuration of the editor. The editor changes it. You need to adust ist there. You did not write that you enabled the html mode in the editor, you did not mention your editor, and you did not mention the rights, which you used to edit it. All of that can change how html chars are handled.

It also does not crash vm, else there wouldnt be any email.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gba

Hi Max!

QuoteThis is not true. I just directly said it will cost per hour and there is no guarantee that I find the reason and that I anyway answer here in the forum for free, when I have an idea.
No reason for blasting!
GJC wrote
Quote.. next step is if u don't have the skills to go further you employ someone who has..
and I just wrote, that I've already asked for paid support - I have no problem with that. Although asking for paid support more than a week ago actually no one had a look at my installation. Maybe you want to check our chat a little bit closer  ;)

QuoteAnd the probelm with your pasted text is the configuration of the editor.
I actually have no editor activated - so the blank HTML code is pasted and stored in the field mentioned.

Although I am not paid for testing and debugging VM, I am still prepared to give constructive input, if there would be something, that could be improved in VM.

Kind regards,
Gerald