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.

unable to display an error with $Cpanel::CPERROR{$Cpanel::context}

Discussion in 'cPanel Developers' started by smooth_p, Jul 20, 2011.

  1. smooth_p

    smooth_p Registered
    PartnerNOC

    Joined:
    Jan 12, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Update: This seems to be an issue in 11.28.87 and 11.30.1

    Hey, Ive been using the CustomEventHandler.pm to tap into various api and deny certain actions - in this example the cron::add_line call.

    What im trying to achieve here is - if a user tries to add a cron which runs with a frequency less than 15 mins,
    I want to throw an error on the page..

    Heres the snippet
    While the evenhandler works perfect, cron is prevented from being added, I don't get the message displayed on the page which Ive defined - $CPanel::CPERROR{$Cpanel::context} = "[fail]";

    Instead I see an error box with
    - Am I missing something out?
    - Is there a better way to do what im trying to
    - Is there any hack I could implement to display the message


    Thanks,
    Joel
     
    #1 smooth_p, Jul 20, 2011
    Last edited: Jul 21, 2011
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi Joel,

    I'm able to reproduce this and need to investigate it further. ATM, I'm not sure if it's a systemic problem or just isolated to this call. Are you experiencing this on other API2 calls as well?

    Thanks,
    -DavidN
     
  3. smooth_p

    smooth_p Registered
    PartnerNOC

    Joined:
    Jan 12, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hey,

    Thanks for your reply! well Ive been using it for the 'SSL' api and haven't been having any trouble there..
    If theres any specific API call you'd like me test let me know.. Also is there a fix I could try out without having to upgrade :p

    Thanks again,
    Joel
     
  4. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    This is a bug with the JS code on that page.

    We have located the source of the issue and are working on a resolution currently.

    Thanks for your patience.
     
Loading...

Share This Page