Author Topic: [solved] Email source code broken in v3.0.17 with Joomla 3.6.2  (Read 2401 times)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8891
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #15 on: September 22, 2016, 15:14:00 pm »
I've said it before.. simply replace the files
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

gba

  • Jr. Member
  • **
  • Posts: 279
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #16 on: September 22, 2016, 15:28:18 pm »
I did replace the files - nothing changed.

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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8891
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #17 on: September 22, 2016, 15:39:16 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #18 on: September 22, 2016, 15:49:11 pm »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gba

  • Jr. Member
  • **
  • Posts: 279
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #19 on: September 22, 2016, 15:59:25 pm »
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

gba

  • Jr. Member
  • **
  • Posts: 279
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #20 on: September 27, 2016, 15:01:36 pm »
*Urgent push*

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8891
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.4.2
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #21 on: September 27, 2016, 15:54:40 pm »
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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27462
  • Always on vacation
    • Jenkin Hill Internet
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #22 on: September 27, 2016, 16:48:18 pm »
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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.10 PHP 7.0.33
Testing VM 3.5.0.10097 on Joomla 3.9.10

gba

  • Jr. Member
  • **
  • Posts: 279
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #23 on: September 27, 2016, 17:19:18 pm »
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:
Code: [Select]
$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
Code: [Select]
$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

  • Jr. Member
  • **
  • Posts: 279
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #24 on: September 29, 2016, 10:52:47 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #25 on: September 29, 2016, 13:03:29 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gba

  • Jr. Member
  • **
  • Posts: 279
Re: Email source code broken in v3.0.17 with Joomla 3.6.2
« Reply #26 on: September 29, 2016, 13:22:41 pm »
Hi Max!

Quote
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.
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  ;)

Quote
And 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