Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WHM 62 (Build 19 / 20) / Listpkg API Bug

Discussion in 'General Discussion' started by Fr3DBr, Apr 7, 2017.

Tags:
  1. Fr3DBr

    Fr3DBr Member

    Joined:
    Apr 6, 2013
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    The Netherlands
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi, guys.

    Over 3 years, we've been using reseller account to provision customer accounts in cPanel. Although until Version 62 / Build 17, listpkgs was working properly, returning all the selected/defined packages.

    Although, for some reason we aren't aware of, since Build 19 and 20, listpkgs isn't working anymore resulting in access denied for WHMCS.

    When you set the reseller with "root privileges", listpkgs work fine showing all the packages.

    I've tried deleting/recreating all the packages, it works fine in WHM, I can upgrade/downgrade packages and so on, but in listpkgs the result is always the same, access denied.

    What can we do to have this fixed, as I don't want to give root privileges to the reseller accounts ?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @Fr3DBr,

    I'm currently unable to reproduce the issue you have reported. Could you verify which specific steps you are taking to reproduce the issue, and the privileges you have assigned to the reseller account?

    Thank you.
     
  3. Fr3DBr

    Fr3DBr Member

    Joined:
    Apr 6, 2013
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    The Netherlands
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi, Michael.

    1) Make a new order in WHMCS w/ a Web Hosting Service.
    2) Go to Product Details change the product with package A (the one which was ordered) to package B (the one you will upgrade to).
    3) Press "Change Package" and wait.
    4) You'll get the following error message:

    Code:
    Module Command Error
    Product attribute Package Name "PACK_2" not found on server
    
    When checking module logs, we can get the following informations (screenshot attached).

    Basically, listpkgs API returns access denied. But what is curious is, it only happens with "Change Package", if you go to the "product setup" and check the "package list" you can see all them, because everything is returned properly. As you can see in Image 2, also attached.

    It's the same server, with same reseller account and same privileges as you can see.
     

    Attached Files:

  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I recommend reporting this issue to the WHMCS support team. You can find their support forums at:

    WHMCS Community Forums

    Thank you.
     
  5. Fr3DBr

    Fr3DBr Member

    Joined:
    Apr 6, 2013
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    The Netherlands
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I've did, and they've told me to speak with you. :D (Look the screenshot).
     

    Attached Files:

  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you access WHM as the reseller, and append the browser URL to the "listpkgs" WHM API 1 function to see the output? EX:

    Code:
    https://hostname.example.com:2087/cpsess##########/json-api/listpkgs?api.version=1
    Does this produce a list of the available packages, or do you see the error message?

    Thank you.
     
    Fr3DBr likes this.
  7. Fr3DBr

    Fr3DBr Member

    Joined:
    Apr 6, 2013
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    The Netherlands
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi, Michael.

    I've logged as the reseller and tried your link, this is what is returned:

    {"data":{"pkg":[]},"metadata":{"command":"listpkgs","version":1,"reason":"OK","result":1}}

    (No package list) But the reseller account has the option to "allow usage of global packages" enabled.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look and determine why the available packages aren't listed on the affected system? You can post the ticket number here and we will update this thread with the outcome.

    Thank you.
     
  9. Fr3DBr

    Fr3DBr Member

    Joined:
    Apr 6, 2013
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    The Netherlands
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Sure, btw seems this link has some issue with CSS right now, as things are showing a bit messed up.

    It's done, ticket ID: 8363987

    Thanks.
     
    #9 Fr3DBr, Apr 7, 2017
    Last edited: Apr 7, 2017
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, it looks like a new WHMCS support ticket was opened to report this issue. Feel free to update this thread with the outcome once you hear back.

    Thanks!
     
  11. Fr3DBr

    Fr3DBr Member

    Joined:
    Apr 6, 2013
    Messages:
    21
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    The Netherlands
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Hi, Michael.

    Yes, by discussing with the support department, this is related to a change WHMCS might do in order to work in this scenario.
     
    cPanelMichael likes this.
Loading...

Share This Page