Jump to content
  • 1

Blesta 4.4.0 - since upgrade: Payment Reminders and Deliver Invoices


Question

  • First time ever with Blesta (been a user for years and years) since 4.4.0 upgrade, I am getting a health warning in the system status on the homepage. Advisory points to cron jobs not completing.
  • Visiting the cron panel, I can see Payment Reminders and Deliver Invoices are showing loaders and never stop... Time of cron start advances every 5 minutes or whatever the cron period is, so the cron is being fired, but the scripts are not completing execution.
  • Visiting client panels, I can see invoices building up with Unsent remaining their status (ouch)
  • I attempt to trigger invoice delivery to myself and receive nothing.

Has anyone else seen this or even better have a fix? Meanwhile, I am going to try barebones 4.4.0 reinstall

Cheers!

Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 0

I did a barebones upgrade. On attempting to manually email invoices, I at least now could see an error re invalid invoice template. I might have had a customised one... can't remember! So I flipped back to default, and now can send out invoices by email OK manually.

The system status is still giving me woe re cron jobs, so I will keep an eye on that while it moves through its queue, maybe within a day it will have zeroed out all pre-existing errors. Will report progress.

Cheers

Link to post
Share on other sites
  • 0

I'm still getting errors with unsuspend task - however, I did delete an old unused company and perhaps that had one or two services still in it. Wasn't my company, I asked the user to migrate to their own system, so they may have left some services going...

Still running tests, but it's probably all my own data screwing Blesta around.

Link to post
Share on other sites
  • 0
16 hours ago, wavesource said:

I'm still getting errors with unsuspend task - however, I did delete an old unused company and perhaps that had one or two services still in it. Wasn't my company, I asked the user to migrate to their own system, so they may have left some services going...

Still running tests, but it's probably all my own data screwing Blesta around.

 

14 hours ago, katycomputer said:

OK, I'll try updating the templates - it's a tedious process.

If you are running a custom or modified PDF invoice template, you will almost certainly have to update it due to the update to TCPDF. We had to make modifications to the templates to get them to work properly. I would suggest testing with one of the included templates to see if that resolves the issue.

You should also check the logs, typically at ../logs_blesta/ (but defined under Settings > System > General) to see if any errors are written at the time of the cron task running. Any errors would be very helpful in determining the issue.

Link to post
Share on other sites
  • 0

Hi there,

I upgraded from 4.2.2 to 4.4.0 yesterday, all went smooth, running php 7.1 - placed the php hotfix, etc, all went smooth.

Today, I login to admin and see:

 "There are one or more cron tasks that have been executing for more than 60 minutes."

Upon checking which one is stuck, it seems like the "Payment Reminders" are stuck.

Further more, inside logs, I see:

[2018-11-18 15:30:02] general.ERROR: Uncaught Exception Error: "Call to undefined method HtmlInvoicePdf::AliasNbPages()" at /mnt/blockstorage/rocketsavvy/public_html/myaccount/components/invoice_templates/html_invoice/html_invoice_pdf.php line 152 {"exception":"[object] (Error(code: 0): Call to undefined method HtmlInvoicePdf::AliasNbPages() at /mnt/blockstorage/rocketsavvy/public_html/myaccount/components/invoice_templates/html_invoice/html_invoice_pdf.php:152)"} 

Any help is appreciated.

 

P.S. I read the thread above and I am not running any customized PDF templates. Just whatever blesta 4.2.2 had.

Link to post
Share on other sites
  • 0

Not sure what the problem is, but we are also seeing problems with fresh Blesta installs, we use softaculous, it reports:
The following errors were found :

exec function does not exist

I opened a ticket with softaculous, assuming it's a softaculous/cPanel issue, if others are seeing the issue, perhaps it's a Blesta 4.4.0 issue :-(

 

Link to post
Share on other sites
  • 0

As mentioned, I've cleaned out the blesta root, installed 4.4.0 clean (except company directory), reset the invoice back to default.

Unsuspend services task is timing out still, but let's look at logs:

This general-warning entry is a new friend since 4.4.0:

  • [2018-11-18 21:15:03] general.WARNING: E_WARNING: imap_open(): Couldn't open stream {:110/pop3/novalidate-cert} {"code":2,"message":"imap_open(): Couldn't open stream {:110/pop3/novalidate-cert}","file":"/home/USER/public_html/plugins/support_manager/vendors/php-imap/ImapMailbox.php","line":36}

Aside from the usual legitimate chatter, that's about it - there's a swiftmailer deprecation warning but that's not going to get in the way of anything

Paul: re data structure, if I wanted to query services linked to clients owned by company ID = X, what am I looking for? Until I am sure there aren't any of these lurking around, I can't state there's a real error with Blesta.

Link to post
Share on other sites
  • 0
11 hours ago, Paul said:

 

If you are running a custom or modified PDF invoice template, you will almost certainly have to update it due to the update to TCPDF. We had to make modifications to the templates to get them to work properly. I would suggest testing with one of the included templates to see if that resolves the issue.

You should also check the logs, typically at ../logs_blesta/ (but defined under Settings > System > General) to see if any errors are written at the time of the cron task running. Any errors would be very helpful in determining the issue.

When I try emailing an invoice the log reports:

[2018-11-19 03:13:50] general.ERROR: Uncaught Exception Error: "Call to undefined method HtmlInvoicePdf::AliasNbPages()" at /home/katycomputer/public_html/billing/components/invoice_templates/html_invoice/html_invoice_pdf.php line 152 {"exception":"[object] (Error(code: 0): Call to undefined method HtmlInvoicePdf::AliasNbPages() at /home/katycomputer/public_html/billing/components/invoice_templates/html_invoice/html_invoice_pdf.php:152)"}

Where have I gone wrong?

Link to post
Share on other sites
  • 0

I personally avoid using any automated installer.

I am assuming Sofaculous has installed the latest Blesta version - this post refers to Blest 4.4.0. Which it may not have (go to first line of this post).

In this case, this is an error thrown from mPDF

Interesting thing is if you look at the location of the templates, html_invoice is not a subfolder in the latest Blesta 4.4.0 release. It's default_invoice, ie. on your system it's /home/katycomputer/public_html/billing/components/invoice_templates/default_invoice

So I would go to Settings => Company => Billing/Payment => Invoice Customization and make sure your Invoice Type (5th input down) is set to Default.

If it isn't, that's your problem.

If it is, then open your host file manager, and take a look at that directory structure and see what you can see. 4.4.0 comes with default_invoice, perforated_invoice and quickbooks_invoice subfolders in invoice_templates - they should be there.

If you're using 4.4.0 and they are not, download latest Blesta from your customer login, extract, and upload just those three folders into the correct location and see if that helps

 

Link to post
Share on other sites
  • 0

No, "Standard" is the default one. You are set up OK. You can delete the html_invoice directory if you want, I don't think it get in the way of anything if you leave it there.

FYI, when I say mPDF, Blesta uses TCPDF which is a fork of the same sort of library. mPDF, rfpdf, TCPDF etc. are all similar and yet not the same. I was just too lazy to look closely at Blesta structure and I'm more familiar with mPDF from my own development.

So the first approach we took was one where I thought, perhaps the method of invoking footers in TCPDF has changed, and Blesta invoice has been updated not to use it, hence we need to confirm you are using latest build template. This was sort of supported by comments made on this forum around the fact the templating has changed in 4.4.0

Poking around on the web, here's the sort of error you're seeing: https://www.drupal.org/project/print/issues/1188232

This is from obviously a Drupal CMS context, but the response suggests that it is a TCPDF library issue. A build this person used had deprecated or mistakenly removed this class and then they put it back in again. Sometimes strange things happen when developers merge things for a release. However, updating TCPDF library gets things back on track.

So grab the latest Blesta archive, unzip and then find in the /vendors directory the /tcpdf directory, and just replace the tcpdf contents on the host with the latest. This gives you then the TCPDF library Blesta have tested and have released, and removes any doubt around the provenance of the files you have been given by the host installer.

If you still have an error, then it's time for Blesta support ticket, as this would suggest the error lies elsewhere. But it's hard to imagine that to be the case with the specific error you are receiving.

Link to post
Share on other sites
  • 0

For the record, I have been having issues with clients being unable to login (loading blesta as a client results in a blank page, so there's an issue with maybe htaccess or more likely the customised templates I am using etc. ) - and worst of all, my Stripe payment gateway module has not been able to process payments. Still haven't resolved the system health thing, but I can definitely say, you can trust that damn little widget!

So I've just rolled Blesta back to 4.3.0 and all is well again.

I will have to install 4.4.0 in a subdirectory and do a clean install with a copied database, and remove any plugins and modules and just rebuild it to try and debug what these issues are.

Link to post
Share on other sites
  • 0

I suspect everyone here is having trouble because of the error mentioned above:

"Call to undefined method HtmlInvoicePdf::AliasNbPages()" at /path/to/blesta/components/invoice_templates/html_invoice/html_invoice_pdf.php line 152

I have not taken a look at that custom template, but most-likely you can simply comment out the offending line (i.e. line 152 of that file) to not make a call to "AliasNbPages". You can also contact the original author of the template to ask them to update it to support v4.4.0.

Link to post
Share on other sites
  • 0
11 hours ago, Tyson said:

I suspect everyone here is having trouble because of the error mentioned above:

"Call to undefined method HtmlInvoicePdf::AliasNbPages()" at /path/to/blesta/components/invoice_templates/html_invoice/html_invoice_pdf.php line 152

I have not taken a look at that custom template, but most-likely you can simply comment out the offending line (i.e. line 152 of that file) to not make a call to "AliasNbPages". You can also contact the original author of the template to ask them to update it to support v4.4.0. 

With blesta 4.4.0  an new TFCPD engine was introduced, we will update the components to be able to use blesta 4.4.0 and make it backward compatibility with older blesta like 3.6.X and 4.0.0.

anyone using had html_template installed even if is not used in the setting, rename the folder or delete it until we release a new version, don't worry we will release new version.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...