Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Undefined class constant 'MAJOR_VERSION' #71

Closed
markschrik opened this issue Sep 29, 2020 · 4 comments
Closed

Error: Undefined class constant 'MAJOR_VERSION' #71

markschrik opened this issue Sep 29, 2020 · 4 comments

Comments

@markschrik
Copy link

markschrik commented Sep 29, 2020

Hello,

We did a clean install of WHMCS 8, which on the marketplace is stated as supported.
We have no composer items manually installed, just what came with WHMCS and this package. We followed the readme, did NOT get the source cod, but the release one.

Any clue what we did wrong, or did something change in 8.0 why it does not work? I have no clue.

This is happening whenever we try to open the invoice.
Thank you.

Error: Undefined class constant 'MAJOR_VERSION' in /home/admin/domains/DOMAIN.TLD/public_html/client/vendor/guzzlehttp/guzzle/src/Utils.php:121
Stack trace:
#0 /home/admin/domains/DOMAIN.TLD/public_html/client/vendor/guzzlehttp/guzzle/src/functions.php(61): GuzzleHttp\Utils::defaultUserAgent()
#1 /home/admin/domains/DOMAIN.TLD/public_html/client/modules/gateways/mollie/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /home/admin/domains/DOMAIN.TLD/public_html/client/modules/gateways/mollie/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults(Array)
#3 /home/admin/domains/DOMAIN.TLD/public_html/client/modules/gateways/mollie/vendor/mollie/mollie-api-php/src/MollieApiClient.php(269): GuzzleHttp\Client->__construct(Array)
#4 /home/admin/domains/DOMAIN.TLD/public_html/client/modules/gateways/mollie/mollie.php(47): Mollie\Api\MollieApiClient->__construct()
#5 /home/admin/domains/DOMAIN.TLD/public_html/client/modules/gateways/molliecheckout_devapp.php(21): mollie_link(Array, NULL)
#6 /home/admin/domains/DOMAIN.TLD/public_html/client/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): molliecheckout_devapp_link(Array)
#7 /home/admin/domains/DOMAIN.TLD/public_html/client/vendor/whmcs/whmcs-foundation/lib/Module/Gateway.php(0): WHMCS\Module\AbstractModule->call('link', Array)
#8 /home/admin/domains/DOMAIN.TLD/public_html/client/vendor/whmcs/whmcs-foundation/lib/Invoice.php(0): WHMCS\Module\Gateway->call('link', Array)
#9 /home/admin/domains/DOMAIN.TLD/public_html/client/viewinvoice.php(0): WHMCS\Invoice->getPaymentLink()
#10 {main}
@micheldeking
Copy link

I fixed this for now.

Download the source from github to a temp directory on you linux server: https://github.com/0100Dev/WHMCS-Mollie-Payments
Run in that directory: composer update (vendor files like guzzle are updated)

And then upload mollie as normal to the whmcs modules/gateway map and it should work.

@markschrik
Copy link
Author

markschrik commented Sep 29, 2020

Hi. When I remove the entire mollie gateway, upload it to a temp folder, do the composer update there and then upload the normal files from the source to the gateway folder I get the following;

Whoops\Exception\ErrorException: require_once(): Failed opening required '/home/admin/domains/DOMAIN.TLD/public_html/client/modules/gateways/mollie/vendor/autoload.php' (include_path='.:/usr/local/php73/lib/php') in /home/admin/domains/DOMAIN.TLD/public_html/client/modules/gateways/mollie/mollie.php:3
Stack trace:
#0 /home/admin/domains/DOMAIN.TLD/public_html/client/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(64, 'require_once():...', '/home/admin/dom...', 3)
#1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()
#2 {main}

If I also upload the vendor folder, this one disappears, but I get the old one back that I started with.

@Wouter0100
Copy link
Member

Should be fixed in the version 3.0. Please download the latest release from the releases page and try again.

@camielpeeters
Copy link

camielpeeters commented Mar 25, 2021

When I upload and replace 3.0 files from the SRC folder, I still get the same errormessages as this topic states.
Is it needed to first remove all and then upload to avoid this error or should an override of files be enough?
I want to remove the whole gateway and upload again but when this does not resolve the problem, what els can I do?
No experience in updating/manipulating a composer update..

@0100Dev 0100Dev locked as resolved and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants