Jump to content

Product Addons billing cycles issues


Recommended Posts

Not sure what happened to the previous thread I had created, is there perhaps a moderation that doesn't publish threads until reviewed? If yes, sorry for posting twice.

 

However I am facing the next issues with product addons billing cycles

 

1). Old product addon prices are marked as Annually, if I activate monthly cycle and set a value, upon saving the changes the Monthly cycles gets disabled automatically and the value assigned to Monthly gets applied to the Annually cycle.

2). From client side panel, if navigating to Available Product Addons, the addons prices that have only Annually billing cycles are labeled as Monthly: http://prntscr.com/fcrnwz - setup: http://prntscr.com/fcrrax

 

Can anyone else confirm these bugs or is it just me and my setup?

 

Thank you

Link to comment
Share on other sites

which version of WHMCS are you using?

 

it doesn't sound like something that should normally happen.... if memory serves, the addons page show the minimum billing cycle - so maybe there is a monthly price in the database?

 

it's possible you might need to open a ticket for this and let WHMCS inspect the setup.... though there appears to be a long delay in WHMCS support even responding to tickets, let alone solving them! :roll:

Link to comment
Share on other sites

Hi brian!

Thanks for getting in touch. Yeah, I hear that quiet often lately on the forums (and it kinda worries me tbh :D) that tickets are not being responded so fast, but since i have the license rented through the VPS providers i would not even be able to open a ticket.

 

Anyway, my WHMCS version is 7.2.1

 

I created a new product addon and set an Annual price, this time it was showing correctly. It looks like you were right, there must be a monthly price in the database, despite product addons didn't had different billing cycles prior to v7.2.1.

Link to comment
Share on other sites

Thanks for getting in touch. Yeah, I hear that quiet often lately on the forums (and it kinda worries me tbh :D) that tickets are not being responded so fast, but since i have the license rented through the VPS providers i would not even be able to open a ticket.

even if you have a license through a reseller, you can still use WHMCS support via Reseller Support - no need to login. :idea:

Link to comment
Share on other sites

Last time I contacted WHMCS support, was told I will have to handle it through the reseller, go figure.

 

Either way, I did another test. On the newly created Product Addon that had an Annually cycle only, i did set a Monthly cycle, saved, than disabled the Monthly cycle.. looks like disabling the monthly cycle doesn't remove the data from database so it now shows it as "Monthly" with the price of the Annually, wicked.

Link to comment
Share on other sites

Last time I contacted WHMCS support, was told I will have to handle it through the reseller, go figure.

it's a new low when they don't even know their own rules. 43.gif

 

Either way, I did another test. On the newly created Product Addon that had an Annually cycle only, i did set a Monthly cycle, saved, than disabled the Monthly cycle.. looks like disabling the monthly cycle doesn't remove the data from database so it now shows it as "Monthly" with the price of the Annually, wicked.

if it helps, I just tried this and it seems to be working fine - e.g if I add a cycle, price, save and then disable it... the price is getting removed from the database (-1 for disabled) and the correct available minimum cycle is shown on the client page.

 

so it seems in your setup, it's not working the way it should... perhaps an issue with the upgrade?

 

i'd upload the 'vendor' folder again (from the full release of the version you're using) - just on the off-chance there's a corrupt/incomplete file somewhere.

Link to comment
Share on other sites

i'd upload the 'vendor' folder again (from the full release of the version you're using) - just on the off-chance there's a corrupt/incomplete file somewhere.

 

Hi brian!

Thanks for the follow up and the suggestion.

 

It seems that you are absolutely right, there was a "corrupt" file during the update and I had a Oops error, and when I tried to reach the Payment Getaway settings (as i was playing with the invoice template, had to check something) again the Oops error appear, while checking the logs I could see;

 

[27-May-2017 13:28:47 UTC] PHP Fatal error:  Cannot redeclare internetbs_getcountrycodebyname() in [unknown] on line 0
[27-May-2017 13:28:47 UTC] [WHMCS Application] ERROR: Whoops\Exception\ErrorException: Cannot redeclare internetbs_getcountrycodebyname() in [unknown]:0 Stack trace: #0 /home/[i]username[/i]/public_html/clienti/vendor/filp/whoops/src/Whoops/Run.php(382): Whoops\Run->handleError(1, 'Cannot redeclar...', '[unknown]', 0) #1 [internal function]: Whoops\Run->handleShutdown() #2 {main} {"exception":"[object] (Whoops\\Exception\\ErrorException(code: 1): Cannot redeclare internetbs_getcountrycodebyname() at [unknown]:0)"} []
[27-May-2017 13:28:56 UTC] PHP Fatal error:  Cannot redeclare internetbs_getcountrycodebyname() in [unknown] on line 0
[27-May-2017 13:28:56 UTC] [WHMCS Application] ERROR: Whoops\Exception\ErrorException: Cannot redeclare internetbs_getcountrycodebyname() in [unknown]:0 Stack trace: #0 /home/[i]username[/i]/public_html/clienti/vendor/filp/whoops/src/Whoops/Run.php(382): Whoops\Run->handleError(1, 'Cannot redeclar...', '[unknown]', 0) #1 [internal function]: Whoops\Run->handleShutdown() #2 {main} {"exception":"[object] (Whoops\\Exception\\ErrorException(code: 1): Cannot redeclare internetbs_getcountrycodebyname() at [unknown]:0)"} []

 

Funny thing is, looks like after the message I received that I will need to seek support from my VPS provider, from whom I am renting the WHMCS license, my WHMCS account has been deleted too, so now I can't even download the files and replace the "vendor" folder :|

 

Any hints on from where can I download the new files now? In meanwhile I will ask my host to provide them for me.. frustrating however ;)

Link to comment
Share on other sites

Any hints on from where can I download the new files now? In meanwhile I will ask my host to provide them for me.. frustrating however ;)

under normal circumstances, i'd have said https://download.whmcs.com, but I suspect that's direct clients only.... reseller support might be an option, but v8 might be out by the time you get a reply! :roll:

 

WHMCS wouldn't want me to upload it to a public place, but what you could do is search Google for 'whmcs_v721_full.zip' and you may find a hosting company that has uploaded it for their clients.... though take care not to download it from any dodgy websites!

Link to comment
Share on other sites

.... reseller support might be an option, but v8 might be out by the time you get a reply! :roll:

 

:lol::lol::lol:

 

WHMCS wouldn't want me to upload it to a public place, but what you could do is search Google for 'whmcs_v721_full.zip' and you may find a hosting company that has uploaded it for their clients.... though take care not to download it from any dodgy websites!

 

I don't feel comfy with that, I just opened a ticket with my host and hope they can help me solve this issue. If not.. i guess i'll have to risk it and do the search. I might just roll back the old version from the backup and attempt another upgrade through softaculous..

Link to comment
Share on other sites

And out of nowhere the host responds...

 

Dear Astrit,

We no longer offer WHMCS licenses, hence I would request you to purchase a license directly from them.

Please feel free to let us know if you have any more questions.

Kind Regards,
Sam

 

When luck follows you.. :?:

Link to comment
Share on other sites

That is true, although...

 

[02-Jun-2017 10:01:41 UTC] PHP Fatal error:  The file /home/*****/public_html/*****/modules/gateways/internetsecure.php was encoded by the ionCube Encoder for [b]PHP 5.3[/b] and cannot run under PHP 7.0.
Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0
[02-Jun-2017 10:01:41 UTC] [WHMCS Application] ERROR: Whoops\Exception\ErrorException: The file /home/*****/public_html/******/modules/gateways/internetsecure.php was encoded by the ionCube Encoder for [b]PHP 5.3[/b] and cannot run under PHP 7.0.  Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown:0 Stack trace: #0 /home/*****/public_html/****/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(16, 'The file /home/...', 'Unknown', 0) #1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown() #2 {main} {"exception":"[object] (Whoops\\Exception\\ErrorException(code: 16): The file /home/******/public_html/******/modules/gateways/internetsecure.php was encoded by the ionCube Encoder for PHP 5.3 and cannot run under PHP 7.0.\n Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. at Unknown:0)"} []

 

http://php.net/supported-versions.php

 

And even

[31-May-2017 15:31:27 UTC] [WHMCS Application] ERROR: BadFunctionCallException: mysql_free_result is not supported in /home/****/public_html/*****/includes/dbcompatfunctions.php:0 Stack trace: #0 /home/***/public_html/*****/templates/synapsis2016/invoicepdf.tpl(99): mysql_free_result(Object(PDOStatement)) #1 /home/****/public_html/*****/vendor/whmcs/whmcs-foundation/lib/Invoice.php(0): unknown() #2 /home/******/public_html/*****/vendor/whmcs/whmcs-foundation/lib/Invoice.php(0): WHMCS\Invoice->pdfAddPage('invoicepdf.tpl', Array) #3 /home/*****/public_html/*****/includes/invoicefunctions.php(0): WHMCS\Invoice->pdfInvoicePage(144) #4 /home/*****/public_html/*****/dl.php(0): pdfInvoice(144) #5 {main} {"exception":"[object] (BadFunctionCallException(code: 0): [b]mysql_free_result[/b] is not supported at /home/*****/public_html/*****/includes/dbcompatfunctions.php:0)"} []

 

http://php.net/manual/en/function.mysql-free-result.php

 

I am seriously thinking at switching to Blesta ...

Link to comment
Share on other sites

That is true, although...

the internetsecure module is not included with v7 - so if you're seeing it, it will be a remnant of a previous installation and explains why it's using a different encoded version...

 

http://docs.whmcs.com/Version_7.0_Release_Notes

 

Deprecation of InternetSecure Payment Processor

 

The InternetSecure payment processor service is being discontinued on August 31, 2016. As a result, we will no longer shipping the InternetSecure module.

For existing installations, the module will not be removed, however users are recommended to find an alternative payment processor before that time. For a full list of payment gateway options, navigate to Setup > Payment Gateways within your WHMCS installation.

 

if you're trying to use code that's been deprecated from PHP, it's hardly WHMCS fault that it fails... :roll:

 

Warning This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.

 

I am seriously thinking at switching to Blesta ...

it's always good to regularly re-evaluate your options, and it would clearly benefit everyone if WHMCS had a serious rival - but I don't think Blesta is going to be it.

Link to comment
Share on other sites

So practically updates do not remove deprecated files?

 

And I guess you are right about the mysql_free_result, I am using an old template and havent updated the code.

 

Although i got the new files and updated them, still the addons shows as monthly price despite only annually is active as cycle.

 

One other thing, while Analysing tables all status are OK, checking tables also give status OK, optimizing tables however start to show some errors;

 

_dataCli.tblapilog 	optimize 	note 	Table does not support optimize, doing recreate + ...

 

starting from tblapilog and downwards all tables show errors like "Invalid default value for 'created_at'", "Operation failed", "Corrupt", "Can't open table" or "Incorrect datetime value: '0000-00-00 00:00:00' fo."

Edited by AstritK
Link to comment
Share on other sites

So practically updates do not remove deprecated files?

generally no - I can remember when v7 was launched and users upgraded from v6.3, one of the issues was caused by the old whoisservers.php and whoisfunctions.php files being left behind.

 

in some ways, I don't mind that it doesn't delete files (as i'm not sure i'd trust it) - but it should certainly be programmed (perhaps in System Health) to show files that are incompatible or those that can be deleted (not everyone reads the release notes!).

 

Although i got the new files and updated them, still the addons shows as monthly price despite only annually is active as cycle.

i'm still not seeing that in v7.2.2 dev - but then this was a clean beta installation, so it's never been upgraded from a pre-v7 version... I assume you're using the default six and orderform templates and not an old custom one ?

 

One other thing, while Analysing tables all status are OK, checking tables also give status OK, optimizing tables however start to show some errors;

if it were me, i'd have left the tables well alone... WHMCS is a fragile piece of software at the best of times, and so optimisation when it isn't expecting it might cause numerous issues!

Link to comment
Share on other sites

  • 1 month later...

I can confirm the same error. When I save an existing addon, the price saves as "monthly" in the DB even when yearly is selected in WHMCS admin. I've submitted a ticket to WHMCS. The error can be manually fixed in table "tblpricing" by changing prices to -1 for periods not in use; and entering correct price for period in use. However any subsequent saving of addon in WHMCS addon will re-introduce the bug, so it's not save to update addons via WHMCS.

Link to comment
Share on other sites

  • WHMCS Support Manager
Last time I contacted WHMCS support, was told I will have to handle it through the reseller, go figure.

Hi AstritK,

Based upon your contacts with us from the email address associated with your forum account, our Reseller Support team has answered both queries promptly. I cannot locate a ticket where you were advised to contact your licence reseller for support. Please do let me know the Ticket ID where this was the case so I can investigate.

However you would need to contact the reseller to obtain the WHMCS download files or reissue your licence.

 

 

I can confirm the same error. When I save an existing addon, the price saves as "monthly" in the DB even when yearly is selected in WHMCS admin. I've submitted a ticket to WHMCS. The error can be manually fixed in table "tblpricing" by changing prices to -1 for periods not in use; and entering correct price for period in use. However any subsequent saving of addon in WHMCS addon will re-introduce the bug, so it's not save to update addons via WHMCS.

Hi Terra,

I can confirm this is not a known issue. I've done a test on my own fresh v7.2.3 installation and replicated the findings of my colleagues in your support ticket; we have not been able to reproduce the problem.

Please don't hesitate to update your ticket if the problem persists once your after-market customisations have been removed.

Link to comment
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
Reply to this topic...

×   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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated