Postponed (maintainer needs more info)
Project:
Commerce Billy Mail [D7]
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2014 at 10:03 UTC
Updated:
29 May 2017 at 14:15 UTC
Jump to comment: Most recent
Comments
Comment #1
anybodyPlease try the latest versions of this and commerce_billy. It looks like an older problem.
I added the following for that some releases ago:
Comment #2
khayong commentedYes, I saw that function. The function was called as theme callback from menu item 'admin/commerce/orders/%commerce_order/resend-pdf-invoice'. Unfortunately, the rule action 'Send commerce billy invoice mail.' couldn't utilise that function. It was still use admin theme when the rule action was trigger in the backend.
Comment #3
anybodyWell I see your point.
The problem is that I currently have no idea how to set the theme for the (indirect) rules request.
What we need is to set the base theme before
is called in line 220.
Perhaps this should even happen in commerce_billy_pdf.module, but it doesn't have to.
Can someone help in implementation?
Comment #4
anybodyI still have no more idea than what we already did. Please reopen if there is new information.
Comment #5
watergate commentedI think this problem is related to #2153169: Pdf differs in styling when streamed and saved.
I've suggested a solution where the admin is able to set the (default) template files to use by the Commerce Billy PDF module. As long as the custom theme doens't overwrite the particular .tpl.php files, generating the pdf will be done with the specified (custom) template (files).
So, if the provided patch gets accepted, your problem should be fixed and there won't be any need to force Drupal to use the default theme.
Comment #6
anybody#5 you are right. The problems are related. I finally decided to implement a more specific solution via a new configuration option. In the latest .dev version you may now select the .tpl.php files you have overridden in your default template and these will be loaded from there instead of changing the whole directory source as in #2153169: Pdf differs in styling when streamed and saved.
Please test the latest .dev version. It works for me in all conditions.
Comment #7
anybodyComment #10
japerryThis overrides all custom_theme hooks, causing other site customizations to fail.
There should be a conditional wrapped around this hook.
Comment #11
anybodyThank you for your feedback. Do you have a code snippet or patch for me?
Comment #12
anybodyStill no idea how we can fix these problems completely. Is there any related core issue targeting this problem?