Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member Astral God's Avatar
    Join Date
    Sep 2010
    Location
    127.0.0.1
    Posts
    66
    cPanel/Enkompass Access Level

    Root Administrator

    Question Problem with a Roundcube plugin and cPanel

    Hello all cPanel users and devs.

    I'm having a litle problem with a Roundcube webmail plugin. This one was written to let the users change their emails account passwords through Roundcube. The plugin works well, but, only when the cPanel language is English. In my case, cPanel is in French language, so, the plugin works (the password is correctly changed) but the plugin interface returns an error saying that the system as an error and the password can't be changed.

    If you want moire details, just check this thread in Roundcube Trac system:

    #1487015 (Password plugin always return error even if it works good) – Roundcube Webmail

    this attached file: Attachment – Roundcube Webmail

    and specialy this comment from alec:

    "So, I see the cPanel response is in French (I'm not sure, but it's not in English). Password's driver works only with English response. I'm not its author. I don't know cPanel too, but maybe there's a way to force English in HTTP response. Maybe some GET parameter or HTTP request header? "
    Can someone helps me fixing this ? Thanks a lot.

  2. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default

    Hi Astral God,

    Taking a quick look at the RoundCube cPanel driver (cpanel.php). It looks like they are not coding against our APIs.

    Simply, they should be using the API2 call Email::passwdpop and Email::liskpopswithdisk. Instead they are coding against the UI, which as you've observed first hand, is a fragile method of programmatic coding.

    It's very clear where the problem is; this driver will always return a failure message for any language other than English:
    Code:
    94 if(strpos($response, 'success') && !strpos($response, 'failure'))
    91	                {
    92	                        return true;
    93	                }
    The above code shows that their scanning the HTML return page for the English word Success or Failure. These words will change based on the language setting of cPanel. The API will always return English words PLUS it returns an integer result: 1 for success, 0 for failure.

    It shouldn't be too difficult to refactor the cPanel driver. If I get a moment, I'll see what I can do. I can't make any promises since this is not our code; I'm kinda swamped with work and the cPanel conference is next week (gotta get ready!).

    Best Regards,
    -DavidN
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  3. #3
    Member Astral God's Avatar
    Join Date
    Sep 2010
    Location
    127.0.0.1
    Posts
    66
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Ok thank you for your help.

    I've trackback your answer to Roudcube Trac to the attention of developers of Roudcube Plugins with cPanel. Maybe in the future they will use the APIs.

  4. #4
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    If they need any help, please have them let us know and we would be glad to assist them.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  5. #5
    Registered User
    Join Date
    Feb 2012
    Posts
    1
    cPanel/Enkompass Access Level

    Root Administrator

    Thumbs up Re: Problem with a Roundcube plugin and cPanel

    I was facing the same issue with my BlueHost hosting. Though my errors were in English only .
    I solved that problem with help of RoundCube Forum members and you will need an updated patched cPanel driver which does the trick.
    Here is how I solved it - /http://acmeous.blogspot.in/2012/02/how-to-enable-change-password-for.html
    I documented the process as well as I can so that it can help you guys also. Let me know if this works for you too.

Similar Threads & Tags
Similar threads

  1. Replies: 24
    Last Post: 11-23-2010, 07:44 PM
  2. Big problem with cpgs plugin in cpanel
    By Elfofdark in forum cPGS Discussions
    Replies: 4
    Last Post: 02-17-2010, 05:19 PM
  3. roundcube problem
    By vmicovic in forum E-mail Discussions
    Replies: 4
    Last Post: 09-27-2009, 08:13 PM
  4. cPanel Plugin problem.
    By dansgalaxy in forum cPanel Developers
    Replies: 12
    Last Post: 09-11-2009, 10:09 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube