Closed (fixed)
Project:
Commerce Billy Mail [D7]
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2015 at 13:20 UTC
Updated:
19 Aug 2019 at 16:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
diriy commentedI have this issue also. Except a spam folder.
I have also clear body and mail subject but with attachments. But the attachment tpl is possible only if I use the overriden template which I had to create in my theme's folder. And it can't print line items or any other variables at all. I attach some screens. How can I fix it?
Comment #3
grougy commentedIs Variable enabled/installed on your site ?
If so please try to set the variable in admin/config/regional/i18n/variable
- Commerce Billy Mail Subject
- Commerce Billy Mail Body
If Variable module is enabled the $body and $subject will come from Variable module, even if not set...
Looks like a bug, the module should check if the variable is set, not only if Variable module is enabled ?
current code in _commerce_billy_mail_send_order_invoice function :
Comment #4
diriy commentedthe Variable module is properly installed.
I solved this problem by customisation of the template, but I donæt think that it is a proper work of the module, so that's a bug and need to be fixed, I supposed.
Comment #5
grougy commentedThe module should do something like this :
Comment #7
anybodyPlease try with the latest .dev release just released. I fixed it there like described. Please provide final feedback.
Comment #8
diriy commentedworks fine! thank you!
Comment #9
diriy commentedComment #10
jawi commentedWith latest dev version the issue still occurs.
Comment #11
anybodyMhm... any Ideas for reasons? I'm having no clue...
Comment #12
candelas commentedI was having the same problem. I didn't know that I had to enable the variables translation since I got the string translated in admin/config/regional/translate/translate. After reading this thread, I went to the i18n_variable configuration and enabled Commerce Billy Mail Subject and Commerce Billy Mail Body. Then I went to the Commerce Billy Mail configuration admin/commerce/config/billy-invoice/billy-mail and translate the 2 variables. After that it worked. I think that it would be a good idea to add this in the README.txt since people we can mistake. Thanks very much for the module :)
Comment #13
gmrmedia commented@candelas your solution work! :)
Module show error that some string is empty, but it dosent report, that there is no tralslations for subject & body strings ;)
Comment #14
jose.devega commentedHi guys
There are an issue on beta7:
if (module_exists('i18n_variable')) {
// If i18n_variable module is used:
// Get the text variables directly and not from the cache, because the language might not match the current $language here.
$subject = i18n_variable_get('commerce_billy_mail_subject', $language->language, '');
// i18n_variable_get returns nothing if the realm is not set -.-
if (is_null($subject)) {
In case i18n_variable module is enabled and realm for commerce_billy_mail_subject (or commerce_billy_mail_body) is not set, is_null($subject) is not true, so never gets the value of variable.
Solution is calling i18n_variable_get with null instead of '' as default value
Patch added
Comment #15
anybody@jose.devega thank you very much, you are right!
I just corrected this in the latest dev branch. Please test if it's alright now.
Comment #16
jose.devega commentedWelcome, thanks to you!!!
Comment #17
klausiWe just ran into the same bug because we use the latest stable release. The fix was never released.
@Anybody can you make a new release so that people do not run into the same bug again?
Comment #18
anybodyHi @klasi,
sorry! Of course. I just created 7.x-1.0-beta8, please have a try, if everything works fine... some days passed since that commit. ;)