Hello, I am testing an upgrade to LSMB 1.7.13 (from 1.2.26!) and have hit this error when trying to display an invoice from a tex template: Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: file error - invoice: not found at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n' Unfortunately, this does not say where it is looking for the template. An invoice.tex file exists in /var/www/ledgersmb/templates/$USER/ where $USER is the LSMB user I have logged in as but this isn't being found. Please can you tell me where the templates should be installed in order for LSMB to pick them up? Thanks very much, Pete Here is the full slew of warnings, diagnostics etc. in the lead up to the above error message: -------------------------------------------------------------------------------- Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1152 (#1) (W reserved) You used a bareword that might someday be claimed as a reserved word. It's best to put such a word in quotes, or capitalize it somehow, or insert an underbar into it. You might also declare it as a subroutine. Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1374 (#1) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/old/lib/LedgerSMB/Form.pm line 2226 (#2) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl will try to tell you the name of the variable (if any) that was undefined. In some cases it cannot do this, so it also tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. Use of uninitialized value within %xkeyref in hash element at /var/www/ledgersmb/old/lib/LedgerSMB/Form.pm line 2310 (#2) Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 162 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 1429 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/is.pl line 191 (#2) Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2) Use of uninitialized value in foreach loop entry at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2) Argument "" isn't numeric in numeric le (<=) at /var/www/ledgersmb/bin/../old/bin/is.pl line 236 (#3) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate. Note that for the Inf and NaN (infinity and not-a-number) the definition of "numeric" is somewhat unusual: the strings themselves (like "Inf") are considered numeric, and anything following them is considered non-numeric. Use of uninitialized value $lsmb_legacy::myconfig{"acs"} in pattern match (m//) at /var/www/ledgersmb/bin/../old/bin/is.pl line 239 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/bin/../old/bin/is.pl line 287 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 715 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 744 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 756 (#2) Use of uninitialized value in addition (+) at /var/www/ledgersmb/bin/../old/bin/io.pl line 916 (#2) Use of uninitialized value in split at /var/www/ledgersmb/bin/../old/bin/io.pl line 1317 (#2) Use of uninitialized value $IS::inventory_accno_id in string at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 217 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 338 (#2) Use of uninitialized value $_[0] in pattern match (m//) at /usr/share/perl5/I18N/LangTags.pm line 398 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1386 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1394 (#2) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_retrieve_template_data /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (99) -- No match found retrieving the template 'invoice' Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_template_modified /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (129) -- No last modified date for invoice Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_retrieve_template_data /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (99) -- No match found retrieving the template 'invoice' Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_template_modified /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (129) -- No last modified date for invoice Use of uninitialized value in concatenation (.) or string at /var/www/ledgersmb/bin/../old/bin/old-handler.pl line 192 (#2) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: file error - invoice: not found at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n' -------------------------------------------------------------------------------- -- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036
Hi Pete, Good to hear from you! Happy to see you try to upgrade to something newer than 1.2, honestly. 1.7 doesn't search your disc for the templates for invoices: instead, it searches the database. You should be able to upload your templates in bulk to your company database by putting them in a subdirectory of the templates/ directory. With the templates in that directory, you can log into the company database through setup.pl and choose the "Load Templates" button. On the resulting page, there's a drop-down which should contain the name of the subdirectory in which you placed your templates. Select that item in the drop-down and click the "Load Templates" button. Loading the templates one-by-one should also be possible. That works by logging into the company itself from login.pl. Then go to the menu System > HTML Templates > Invoicing > Invoice or System > LaTeX Templates > Invoicing > Invoice. From there, you should be able to upload *just* the invoice of the specific format. Hope that helps (and sorry for the lagging response, I just noticed your mail today). Regards, Erik. On Mon, Nov 16, 2020 at 3:21 PM Pete Houston <ph1@openstrike.co.uk> wrote:
Hello,
I am testing an upgrade to LSMB 1.7.13 (from 1.2.26!) and have hit this error when trying to display an invoice from a tex template:
Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: file error - invoice: not found at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n'
Unfortunately, this does not say where it is looking for the template. An invoice.tex file exists in /var/www/ledgersmb/templates/$USER/ where $USER is the LSMB user I have logged in as but this isn't being found.
Please can you tell me where the templates should be installed in order for LSMB to pick them up?
Thanks very much,
Pete
Here is the full slew of warnings, diagnostics etc. in the lead up to the above error message:
-------------------------------------------------------------------------------- Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1152 (#1) (W reserved) You used a bareword that might someday be claimed as a reserved word. It's best to put such a word in quotes, or capitalize it somehow, or insert an underbar into it. You might also declare it as a subroutine.
Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1374 (#1)
Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/old/lib/LedgerSMB/Form.pm line 2226 (#2) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl will try to tell you the name of the variable (if any) that was undefined. In some cases it cannot do this, so it also tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program.
Use of uninitialized value within %xkeyref in hash element at /var/www/ledgersmb/old/lib/LedgerSMB/Form.pm line 2310 (#2) Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 162 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 1429 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/is.pl line 191 (#2) Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2) Use of uninitialized value in foreach loop entry at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2)
Argument "" isn't numeric in numeric le (<=) at /var/www/ledgersmb/bin/../old/bin/is.pl line 236 (#3) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate.
Note that for the Inf and NaN (infinity and not-a-number) the definition of "numeric" is somewhat unusual: the strings themselves (like "Inf") are considered numeric, and anything following them is considered non-numeric.
Use of uninitialized value $lsmb_legacy::myconfig{"acs"} in pattern match (m//) at /var/www/ledgersmb/bin/../old/bin/is.pl line 239 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/bin/../old/bin/is.pl line 287 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 715 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 744 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 756 (#2) Use of uninitialized value in addition (+) at /var/www/ledgersmb/bin/../old/bin/io.pl line 916 (#2) Use of uninitialized value in split at /var/www/ledgersmb/bin/../old/bin/ io.pl line 1317 (#2) Use of uninitialized value $IS::inventory_accno_id in string at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 217 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 338 (#2) Use of uninitialized value $_[0] in pattern match (m//) at /usr/share/perl5/I18N/LangTags.pm line 398 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1386 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1394 (#2) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_retrieve_template_data /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (99) -- No match found retrieving the template 'invoice' Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_template_modified /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (129) -- No last modified date for invoice Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_retrieve_template_data /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (99) -- No match found retrieving the template 'invoice' Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - WARN - LedgerSMB::Template::DBProvider::_template_modified /var/www/ledgersmb/lib/LedgerSMB/Template/DBProvider.pm (129) -- No last modified date for invoice Use of uninitialized value in concatenation (.) or string at /var/www/ledgersmb/bin/../old/bin/old-handler.pl line 192 (#2) Req:62A47F6E281411EBA7D544DC3F926520 2020/11/16 14:02:39 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: file error - invoice: not found at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n'
--------------------------------------------------------------------------------
-- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036 _______________________________________________ users mailing list -- users@lists.ledgersmb.org To unsubscribe send an email to users-leave@lists.ledgersmb.org
-- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Hi Erik, Thank you for these instructions. I have succeeded in loading the templates en masse using the setup.pl method. I have found that the templates need some reworking in order to be processed in the new LSMB. Having done that and the TT part of the process now running to completion the remaining problem is that the document presented to us is not the postscript output but is simply the raw latex source. Although there are plenty of lines in the error log (see below), none of them seem to explain this. What could cause LSMB to return the raw latex source rather than the generated postscript from it? Thanks, Pete On Wed, Nov 18, 2020 at 09:20:53PM +0100, Erik Huelsmann wrote:
Hi Pete,
Good to hear from you! Happy to see you try to upgrade to something newer than 1.2, honestly.
1.7 doesn't search your disc for the templates for invoices: instead, it searches the database. You should be able to upload your templates in bulk to your company database by putting them in a subdirectory of the templates/ directory. With the templates in that directory, you can log into the company database through setup.pl and choose the "Load Templates" button. On the resulting page, there's a drop-down which should contain the name of the subdirectory in which you placed your templates. Select that item in the drop-down and click the "Load Templates" button.
Loading the templates one-by-one should also be possible. That works by logging into the company itself from login.pl. Then go to the menu System > HTML Templates > Invoicing > Invoice or System > LaTeX Templates > Invoicing > Invoice. From there, you should be able to upload *just* the invoice of the specific format.
Hope that helps (and sorry for the lagging response, I just noticed your mail today).
Regards,
Erik.
Here are the log entries resulting from hitting "Print" on a invoice to print to the screen: -------------------------------------------------------------------------------- Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1152 (#1) (W reserved) You used a bareword that might someday be claimed as a reserved word. It's best to put such a word in quotes, or capitalize it somehow, or insert an underbar into it. You might also declare it as a subroutine. Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1374 (#1) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/old/lib/LedgerSMB/Form.pm line 2226 (#2) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl will try to tell you the name of the variable (if any) that was undefined. In some cases it cannot do this, so it also tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 162 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 1429 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/is.pl line 191 (#2) Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2) Use of uninitialized value in foreach loop entry at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2) Argument "" isn't numeric in numeric le (<=) at /var/www/ledgersmb/bin/../old/bin/is.pl line 236 (#3) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate. Note that for the Inf and NaN (infinity and not-a-number) the definition of "numeric" is somewhat unusual: the strings themselves (like "Inf") are considered numeric, and anything following them is considered non-numeric. Use of uninitialized value $lsmb_legacy::myconfig{"acs"} in pattern match (m//) at /var/www/ledgersmb/bin/../old/bin/is.pl line 239 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/bin/../old/bin/is.pl line 287 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 715 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 744 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 756 (#2) Use of uninitialized value in addition (+) at /var/www/ledgersmb/bin/../old/bin/io.pl line 916 (#2) Use of uninitialized value in split at /var/www/ledgersmb/bin/../old/bin/io.pl line 1317 (#2) Use of uninitialized value $IS::inventory_accno_id in string at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 217 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 338 (#2) Use of uninitialized value $_[0] in pattern match (m//) at /usr/share/perl5/I18N/LangTags.pm line 398 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1386 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1390 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1394 (#2) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_content -- Retrieving template content for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Use of uninitialized value $old_form in hash dereference at /var/www/ledgersmb/bin/../old/bin/io.pl line 1519 (#2) Req:B43BF4542A6E11EBBF1153DC3F926520 192.168.10.6 - - [19/Nov/2020:13:54:13 +0000] "POST /is.pl HTTP/1.1" 200 3707 "http://oldpalma/ledgersmb/login.pl?action=login&company=testbooks" "Mozilla/5.0 (X11; Linux x86_64; rv:68.9) Gecko/20100101 Goanna/4.7 Firefox/68.9 PaleMoon/28.15.0" -------------------------------------------------------------------------------- -- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036
Hi Pete, On Thu, Nov 19, 2020 at 2:57 PM Pete Houston <ph1@openstrike.co.uk> wrote:
Hi Erik,
Thank you for these instructions. I have succeeded in loading the templates en masse using the setup.pl method.
I have found that the templates need some reworking in order to be processed in the new LSMB. Having done that and the TT part of the process now running to completion
That's good progress! Nice!
the remaining problem is that the document presented to us is not the
postscript output but is simply the raw latex source.
Ok. Can you share the first line(s) of your template? I think I know what's missing, but would like to confirm it.
Although there are plenty of lines in the error log (see below), none of them seem to explain this. What could cause LSMB to return the raw latex source rather than the generated postscript from it?
LedgerSMB installs a plugin into Template Toolkit which enhances TT to generate the required postscript output -- given the right instructions. This instruction is what I'm looking for in the first few lines of your template. Regards, Erik.
Thanks,
Pete
Hi Pete,
Good to hear from you! Happy to see you try to upgrade to something newer than 1.2, honestly.
1.7 doesn't search your disc for the templates for invoices: instead, it searches the database. You should be able to upload your templates in bulk to your company database by putting them in a subdirectory of the templates/ directory. With the templates in that directory, you can log into the company database through setup.pl and choose the "Load Templates" button. On the resulting page, there's a drop-down which should contain
On Wed, Nov 18, 2020 at 09:20:53PM +0100, Erik Huelsmann wrote: the
name of the subdirectory in which you placed your templates. Select that item in the drop-down and click the "Load Templates" button.
Loading the templates one-by-one should also be possible. That works by logging into the company itself from login.pl. Then go to the menu System > HTML Templates > Invoicing > Invoice or System > LaTeX Templates > Invoicing > Invoice. From there, you should be able to upload *just* the invoice of the specific format.
Hope that helps (and sorry for the lagging response, I just noticed your mail today).
Regards,
Erik.
Here are the log entries resulting from hitting "Print" on a invoice to print to the screen:
-------------------------------------------------------------------------------- Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1152 (#1) (W reserved) You used a bareword that might someday be claimed as a reserved word. It's best to put such a word in quotes, or capitalize it somehow, or insert an underbar into it. You might also declare it as a subroutine.
Unquoted string "customer" may clash with future reserved word at /var/www/ledgersmb/bin/../old/bin/is.pl line 1374 (#1)
Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/old/lib/LedgerSMB/Form.pm line 2226 (#2) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl will try to tell you the name of the variable (if any) that was undefined. In some cases it cannot do this, so it also tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program.
Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 162 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 1429 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/is.pl line 191 (#2) Use of uninitialized value in array dereference at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2) Use of uninitialized value in foreach loop entry at /var/www/ledgersmb/bin/../old/bin/is.pl line 196 (#2)
Argument "" isn't numeric in numeric le (<=) at /var/www/ledgersmb/bin/../old/bin/is.pl line 236 (#3) (W numeric) The indicated string was fed as an argument to an operator that expected a numeric value instead. If you're fortunate the message will identify which operator was so unfortunate.
Note that for the Inf and NaN (infinity and not-a-number) the definition of "numeric" is somewhat unusual: the strings themselves (like "Inf") are considered numeric, and anything following them is considered non-numeric.
Use of uninitialized value $lsmb_legacy::myconfig{"acs"} in pattern match (m//) at /var/www/ledgersmb/bin/../old/bin/is.pl line 239 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/bin/../old/bin/is.pl line 287 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 715 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 744 (#2) Use of uninitialized value in string eq at /var/www/ledgersmb/bin/../old/bin/io.pl line 756 (#2) Use of uninitialized value in addition (+) at /var/www/ledgersmb/bin/../old/bin/io.pl line 916 (#2) Use of uninitialized value in split at /var/www/ledgersmb/bin/../old/bin/ io.pl line 1317 (#2) Use of uninitialized value $IS::inventory_accno_id in string at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 217 (#2) Use of uninitialized value $dec in numeric gt (>) at /var/www/ledgersmb/old/lib/LedgerSMB/IS.pm line 338 (#2) Use of uninitialized value $_[0] in pattern match (m//) at /usr/share/perl5/I18N/LangTags.pm line 398 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1386 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1390 (#2) Use of uninitialized value in substitution (s///) at /var/www/ledgersmb/bin/../old/bin/io.pl line 1394 (#2) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_content -- Retrieving template content for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_template_modified -- last modified date requested for ./invoice Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, , tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Retrieving template for (invoice, -undef-, tex) Req:B43BF4542A6E11EBBF1153DC3F926520 2020/11/19 13:54:13 - INFO - LedgerSMB::Template::DBProvider::_retrieve_template_data -- Match found Use of uninitialized value $old_form in hash dereference at /var/www/ledgersmb/bin/../old/bin/io.pl line 1519 (#2) Req:B43BF4542A6E11EBBF1153DC3F926520 192.168.10.6 - - [19/Nov/2020:13:54:13 +0000] "POST /is.pl HTTP/1.1" 200 3707 " http://oldpalma/ledgersmb/login.pl?action=login&company=testbooks" "Mozilla/5.0 (X11; Linux x86_64; rv:68.9) Gecko/20100101 Goanna/4.7 Firefox/68.9 PaleMoon/28.15.0"
--------------------------------------------------------------------------------
-- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036
-- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Hi Erik, On Thu, Nov 19, 2020 at 11:30:42PM +0100, Erik Huelsmann wrote:
On Thu, Nov 19, 2020 at 2:57 PM Pete Houston <ph1@openstrike.co.uk> wrote:
the remaining problem is that the document presented to us is not the
postscript output but is simply the raw latex source.
Ok. Can you share the first line(s) of your template? I think I know what's missing, but would like to confirm it.
Although there are plenty of lines in the error log (see below), none of them seem to explain this. What could cause LSMB to return the raw latex source rather than the generated postscript from it?
LedgerSMB installs a plugin into Template Toolkit which enhances TT to generate the required postscript output -- given the right instructions. This instruction is what I'm looking for in the first few lines of your template.
Here is the start of the template: \documentclass[a4wide]{scrartcl} \usepackage[frame]{xy} \usepackage{tabularx} \usepackage{longtable} \usepackage[latin1]{inputenc} \setlength{\voffset}{0.5cm} \setlength{\hoffset}{-2.0cm} \setlength{\topmargin}{0cm} \setlength{\headheight}{0.5cm} \setlength{\headsep}{1cm} \setlength{\topskip}{0pt} \setlength{\oddsidemargin}{1.0cm} \setlength{\evensidemargin}{1.0cm} \setlength{\textwidth}{19.2cm} \setlength{\textheight}{24.5cm} \setlength{\footskip}{1cm} \setlength{\parindent}{0pt} \renewcommand{\baselinestretch}{1} \begin{document} Most of those \setlength commands are going to go once I've tuned it and I expect the \usepackage[latin1]{inputenc} can also go. What else do we need to introduce here to get the latex to be processed? Thanks, Pete -- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036
Hi Pete, On Thu, Nov 19, 2020 at 11:48 PM Pete Houston <ph1@openstrike.co.uk> wrote:
postscript output but is simply the raw latex source.
Ok. Can you share the first line(s) of your template? I think I know what's missing, but would like to confirm it.
Yes. The output you've pasted below confirms it. Your template is missing this essential bit: <?lsmb FILTER latex { format="$FORMAT(pdflatex)" }; -?> at the top and at the bottom: <?lsmb END; -?> Please note that after the end, you should have zero or 1 newline, but not a whole series, because any newlines on top of the first will be added to the output. That should do the trick for both postscript and PDF output. If it doesn't, you can change "$FORMAT(pdflatex)" to "ps" to hard-code the output to be postscript (even for PDF). Hope that helps! Regards, Erik. -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Hi Erik, On Fri, Nov 20, 2020 at 05:19:30PM +0100, Erik Huelsmann wrote:
Yes. The output you've pasted below confirms it. Your template is missing this essential bit:
<?lsmb FILTER latex { format="$FORMAT(pdflatex)" }; -?>
at the top and at the bottom:
<?lsmb END; -?>
Please note that after the end, you should have zero or 1 newline, but not a whole series, because any newlines on top of the first will be added to the output.
That should do the trick for both postscript and PDF output. If it doesn't, you can change "$FORMAT(pdflatex)" to "ps" to hard-code the output to be postscript (even for PDF).
Thanks. I have added these header and footer lines and am now one step further forward. No output is produced (the request results in a 500 code) and this is the message in the error log: Req:8283A5722B5111EBA2BB43DC3F926520 2020/11/20 16:57:45 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: latex error - pdflatex exited with errors:\nfailed to open /tmp/latexdrv1709_0/latexdoc.log for input at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n' Clearly this means that pdflatex is at least being called now. However, I don't see why it is trying to open a log file for input. The directory /tmp/latexdrv1709_0/ does not appear to exist so it was either transient or has never been there. This similar error occurs if I try with format="ps" in the template instead: Req:7D89C6262B5311EBA36542DC3F926520 2020/11/20 17:11:56 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: latex error - latex exited with errors:\nfailed to open /tmp/latexdrv1862_0/latexdoc.log for input at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n' The template file ends like this (as hexdump so you can see the newlines) 0000000 655c 646e 647b 636f 6d75 6e65 7d74 3c0a 0000010 6c3f 6d73 2062 4e45 3b44 2d20 3e3f 000a 000001f I would appreciate any further insight you might have. If there is up-to-date documentation for the templates that would be good to see also. Thanks, Pete -- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036
Hi Pete, On Fri, Nov 20, 2020 at 6:13 PM Pete Houston <ph1@openstrike.co.uk> wrote: [snip] I have added these header and footer lines and am now one step
further forward. No output is produced (the request results in a 500 code) and this is the message in the error log:
Req:8283A5722B5111EBA2BB43DC3F926520 2020/11/20 16:57:45 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: latex error - pdflatex exited with errors:\nfailed to open /tmp/latexdrv1709_0/latexdoc.log for input at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n'
Clearly this means that pdflatex is at least being called now. However, I don't see why it is trying to open a log file for input. The directory /tmp/latexdrv1709_0/ does not appear to exist so it was either transient or has never been there.
That's correct: the directory is transient and that makes this a bit hard to diagnose. The reason the log file is being opened for input (by LedgerSMB) is that it tries to establish whether a re-run would be required to resolve any references within the document. This isn't usually the case for invoices, but the driver is a generic LaTeX runner, so for other types of documents this may matter (and we cannot exclude people using documents where it *does* matter). What I usually do to see what the problem could be, is to download the rendered template which is used as the latex input. (The document without the header and footer lines.) Then I run pdflatex manually on the server with that file as its input. If there is a problem with the template or with the pdflatex setup, running from a terminal shows 90% of the problems. Just as a side-note, which version of LaTeX::Driver are you using? (`perl -MLaTeX::Driver -e 'print "$LaTeX::Driver::VERSION\n";'` should tell you.)
This similar error occurs if I try with format="ps" in the template instead:
Req:7D89C6262B5311EBA36542DC3F926520 2020/11/20 17:11:56 - ERROR - lsmb_legacy::catch {...} /var/www/ledgersmb/bin/../old/bin/old-handler.pl (175) -- 'Template error: latex error - latex exited with errors:\nfailed to open /tmp/latexdrv1862_0/latexdoc.log for input at /var/www/ledgersmb/lib/LedgerSMB/Template.pm line 564.\n'
Yes. It's expected to fail on 'ps' if it fails on 'pdf' with this error.
The template file ends like this (as hexdump so you can see the newlines)
0000000 655c 646e 647b 636f 6d75 6e65 7d74 3c0a 0000010 6c3f 6d73 2062 4e45 3b44 2d20 3e3f 000a 000001f
Ok. This looks good in terms of the number of newline characters at the end.
I would appreciate any further insight you might have. If there is up-to-date documentation for the templates that would be good to see also.
The most up-to-date documentation for templating that I have is: https://github.com/ledgersmb/LedgerSMB/blob/master/doc/templating/templating... ; recently I started to collect all available template variables, with the intent to document them. The variables are available (by name) at https://github.com/ledgersmb/LedgerSMB/wiki/Template-variables. Let me know where your priorities lie, that'll help focus the effort to the immediately useful. Regards, -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
Hi Erik, On Sat, Nov 21, 2020 at 12:29:02PM +0100, Erik Huelsmann wrote:
That's correct: the directory is transient and that makes this a bit hard to diagnose. The reason the log file is being opened for input (by LedgerSMB) is that it tries to establish whether a re-run would be required to resolve any references within the document. This isn't usually the case for invoices, but the driver is a generic LaTeX runner, so for other types of documents this may matter (and we cannot exclude people using documents where it *does* matter).
That all makes sense - thanks.
What I usually do to see what the problem could be, is to download the rendered template which is used as the latex input. (The document without the header and footer lines.) Then I run pdflatex manually on the server with that file as its input. If there is a problem with the template or with the pdflatex setup, running from a terminal shows 90% of the problems.
I actually did that a couple of days ago when the printing returned the latex source rather than the postscript - I was able to run that by hand and it seemed to process fine. The resulting postscript looked OK and there were no errors that I could determine. I have re-done it now (having removed the 1st and last lines to allow delivery of the latex to the user) and here is the full output: -------------------------------------------------------------------------------- This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./goagain.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/koma-script/scrartcl.cls Document Class: scrartcl 2004/09/16 v2.9t LaTeX2e KOMA document class (/usr/share/texmf/tex/latex/koma-script/scrlfile.sty Package scrlfile, 2004/09/16 v2.9t LaTeX2e KOMA package Copyright (C) Markus Kohm ) (/usr/share/texmf/tex/latex/base/size11.clo) (/usr/share/texmf/tex/latex/koma-script/typearea.sty Package typearea, 2004/09/16 v2.9t LaTeX2e KOMA package Copyright (C) Frank Neukam, 1992-1994 Copyright (C) Markus Kohm, 1994-2002 )) (/usr/share/texmf/tex/generic/xypic/xy.sty (/usr/share/texmf/tex/generic/xypic/xy.tex Bootstrap'ing: catcodes, docmode, (/usr/share/texmf/tex/generic/xypic/xyrecat.tex) (/usr/share/texmf/tex/generic/xypic/xyidioms.tex) Xy-pic version 3.7 <1999/02/16> Copyright (c) 1991-1998 by Kristoffer H. Rose <krisrose@ens-lyon.fr> Xy-pic is free software: see the User's Guide for details. Loading kernel: messages; fonts; allocations: state, direction, utility macros; pictures: \xy, positions, objects, decorations; kernel objects: directionals, circles, text; options; algorithms: directions, edges, connections; Xy-pic loaded) (/usr/share/texmf/tex/generic/xypic/xyframe.tex Xy-pic option: Frame and Bracket extension v.3.7 loaded)) (/usr/share/texmf/tex/latex/tools/tabularx.sty (/usr/share/texmf/tex/latex/tools/array.sty)) (/usr/share/texmf/tex/latex/tools/longtable.sty) (/usr/share/texmf/tex/latex/base/inputenc.sty (/usr/share/texmf/tex/latex/base/latin1.def)) LaTeX Warning: Unused global option(s): [a4wide]. No file goagain.aux. Underfull \hbox (badness 10000) in paragraph at lines 52--102 Overfull \hbox (298.76408pt too wide) in alignment at lines 145--151 [] [] [] [] [] [] [] Package longtable Warning: Column widths have changed (longtable) in table 1 on input line 151. Package longtable Warning: Table widths have changed. Rerun LaTeX. Overfull \hbox (6.98332pt too wide) has occurred while \output is active |[] Overfull \vbox (4.47362pt too high) has occurred while \output is active [1] (./goagain.aux) ) (see the transcript file for additional information) Output written on goagain.dvi (1 page, 1984 bytes). Transcript written on goagain.log. -------------------------------------------------------------------------------- This has produced a .dvi file and I can convert that to postscript with dvips just fine.
Just as a side-note, which version of LaTeX::Driver are you using? (`perl -MLaTeX::Driver -e 'print "$LaTeX::Driver::VERSION\n";'` should tell you.)
It is version 0.300.2.
Ok. This looks good in terms of the number of newline characters at the end.
Great - we can rule that out.
I would appreciate any further insight you might have. If there is up-to-date documentation for the templates that would be good to see also.
The most up-to-date documentation for templating that I have is: https://github.com/ledgersmb/LedgerSMB/blob/master/doc/templating/templating... ; recently I started to collect all available template variables, with the intent to document them. The variables are available (by name) at https://github.com/ledgersmb/LedgerSMB/wiki/Template-variables.
Let me know where your priorities lie, that'll help focus the effort to the immediately useful.
Really, we need to get the postscript/pdf output working. Not being able to generate printable invoices is a stopper. If there's any extra debugging or similar that we can enable to track down why the latex process is giving these failures that would be great. In the meantime I will go through the templating guide and see if there is anything in there which I can use to solve this. Thanks again, Pete -- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036
Hi Pete, On Sat, Nov 21, 2020 at 6:29 PM Pete Houston <ph1@openstrike.co.uk> wrote: [snip]
rendered template which is used as the latex input. (The document without the header and footer lines.) Then I run pdflatex manually on the server with that file as its input. If there is a problem with the template or with the pdflatex setup, running from a terminal shows 90% of the
What I usually do to see what the problem could be, is to download the problems.
I actually did that a couple of days ago when the printing returned the latex source rather than the postscript - I was able to run that by hand and it seemed to process fine. The resulting postscript looked OK and there were no errors that I could determine.
Ok. One of the things that comes to mind is that the PATH and other environment settings differ between your invocation from the command line and the invocation from the server. You can inspect the environment variables defined in the server from setup.pl; after logging into your company database from setup.pl, you can select the last button on the page "System Info". On the resulting page, there's a section "Environment". This section indicates the environment variables your server is running with. Mine has a PATH setting of "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/pgsql/bin" which includes the pdflatex binary in /usr/bin. If your environment doesn't include your `pdflatex` binary, please check the "ledgersmb.conf" file you may (not) have. If you don't, there's an example in doc/conf/ledgersmb.conf.default. This config file has an "[environment]" section which also includes a PATH setting. You can use that to override the path setting your server starts up with.
I have re-done it now (having removed the 1st and last lines to allow delivery of the latex to the user) and here is the full output:
I can't see anything specifically alarming about this output... [snip]
The most up-to-date documentation for templating that I have is:
; recently I started to collect all available template variables, with
intent to document them. The variables are available (by name) at https://github.com/ledgersmb/LedgerSMB/wiki/Template-variables.
Let me know where your priorities lie, that'll help focus the effort to
https://github.com/ledgersmb/LedgerSMB/blob/master/doc/templating/templating... the the
immediately useful.
Really, we need to get the postscript/pdf output working. Not being able to generate printable invoices is a stopper. If there's any extra debugging or similar that we can enable to track down why the latex process is giving these failures that would be great.
Ok. Then I'll keep my focus on helping you out with this problem, while continuing down the path that I was already pursuing for other project work.
In the meantime I will go through the templating guide and see if there is anything in there which I can use to solve this.
Thanks again,
You're welcome! Regards, -- Bye, Erik. http://efficito.com -- Hosted accounting and ERP. Robust and Flexible. No vendor lock-in.
On Sat, Nov 21, 2020 at 09:35:18PM +0100, Erik Huelsmann wrote:
Ok. One of the things that comes to mind is that the PATH and other environment settings differ between your invocation from the command line and the invocation from the server. You can inspect the environment variables defined in the server from setup.pl; after logging into your company database from setup.pl, you can select the last button on the page "System Info". On the resulting page, there's a section "Environment". This section indicates the environment variables your server is running with. Mine has a PATH setting of "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/pgsql/bin" which includes the pdflatex binary in /usr/bin.
If your environment doesn't include your `pdflatex` binary, please check the "ledgersmb.conf" file you may (not) have. If you don't, there's an example in doc/conf/ledgersmb.conf.default. This config file has an "[environment]" section which also includes a PATH setting. You can use that to override the path setting your server starts up with.
Gah! That was it. For some reason pdflatex (and all the other tex binaries) are squirrelled away in /usr/share/texmf/bin on this machine and that wasn't in the PATH in the ledgersmb.conf. Adding that has solved it. Thanks very much for your help tracking it down, Erik. I can now crack on with going through the new templating guide and bringing all my old-style templates up to date. Pete -- Openstrike - improving business through open source https://www.openstrike.co.uk/ or call 01722 770036
participants (2)
-
Erik Huelsmann
-
Pete Houston