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

Fix lost control of new server created on whmcs 8.1.x #109

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

meramsey
Copy link

Description

Updated all deprecated
//use Illuminate\Database\Capsule\Manager as Capsule;

To:
use WHMCS\Database\Capsule;

As recommended by WHMCS.
https://developers.whmcs.com/advanced/db-interaction/

Fixes Related Issues

#88
#91
#92
#105
#106

Tested with latest
WHMCS Version: 8.1.3
PHP 7.3 and PHP7.4
Centos 7

Please NOTE: That i have incorporated some, but NOT all of the fixes from #101
All original credit for those things should be attributed to @jazz7381 and that PR could most likely be closed as mine incoporates the working stuff from there and more.

Also included is a pretty extensive port of the VultrAPI class to V2 which is not in use yet but is pretty close to being able to be used.

It would be nice if this could be merged here in the official repository so it gets better attention from those in need of it vs hunting through forks and having to pick and pull the needed fixes.

The main issue appears to have been in addVMCustomFields where it was failing to add the subid to tblcustomfieldsvalues
meramsey@453c76e

This in turn causes the creation to fail and allows customers to keep trying to create servers they thought failed but are detached from the client area and costing the Reseller money and time wasted going to clean those up and reattaching only one to the account manually.

Feel free to remove the debugging commented out stuff before merging it was left to make it easier to see what was happening and so the behaviour can be reproduced and tested if desired.

Checklist:

  • [x ] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [ x] Have you linted your code locally prior to submission? Left some commented out stuff for clarification but can be removed upon review.
  • [x ] Have you successfully ran tests with your changes locally?

 @jazz7381
jazz7381 use count to use check return by ->get()
Latest commit 359b574 on Dec 20, 2020
 Open
use count to use check return by ->get()
vultr#101
 jazz7381 use count to use check return by ->get()
 jazz7381 use count to use check return by ->get()
start on converting api to v2
refactored most all of the api up to line 742
More refactoring work done
Tested and corrected alot of functions based on testing the API. Refactored app_list and some others to match the old format response wise with hopes this will make things work smoothly when transitioning to V2 API as the data should be more like the old expected format.and require less refactoring.
Fixed the subid not being properly saved into the tblcustomfields which causes it to not register as created.
Should resolve:
vultr#91
vultr#92
vultr#105
vultr#106

Tested with latest 
WHMCS Version: 8.1.3
PHP 7.3 and PHP7.4
Centos 7
@miguemely
Copy link

@whattheserver I'm not sure if anyone from Vultr is still monitoring this repo. Are your changes in your fork on master? I might give it a go.

@meramsey
Copy link
Author

meramsey commented Jul 3, 2021

@miguemely correct see new tagged release i made for this :
https://github.com/whattheserver/whmcs-vultr/releases/tag/2.0.5

@ATommasi
Copy link

ATommasi commented Jul 13, 2021

Thank you very much for the work you've put into this, it's very appreciated.
I'm trying to get it set up and it seems to mostly be working, however, I'm seeing some weird behavior on the products tab. I have about 3 products set up. I'm running WHMCS 8.2
image

@limsoke
Copy link

limsoke commented Dec 15, 2021

i have try use this update, but tblerrorlog in mysql still added every time, and make to many log DB

  • Creating default object from empty value on = modules/addons/vultr/mgLibs/MySQL/Query.php line:43
  • Invalid argument supplied for foreach() on = modules/addons/vultr/models/whmcs/service/customFields/Repository.php Line : 99
    err_log

Copy link

@jsjcjsjc jsjcjsjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants