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.

Custom cpanel plugin icon not displayed in x3 theme

Discussion in 'cPanel Developers' started by tizoo, Aug 14, 2014.

  1. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hi all,

    I cannot say exactly when it starts, but now with cPanel 11.44.1 (build 11) it is no more possible to display our plugin icon in the cPanel menu with X3 theme.

    What we do :

    1. Register the plugin using "/usr/local/cpanel/bin/register_cpanelplugin tzbm.cpanelplugin"
      What make it appears in the feature list. And generate the dynamicui file "/usr/local/cpanel/base/frontend/x3/dynamicui/dynamicui_tzbm.conf" containing :
      Code:
      itemorder=>1,version=>1.0,itemdesc=>Business Mail,description=>Business email,group=>domains,url=>tzbm/index.live.php,feature=>tzbm,imgtype=>icon,subtype=>img,type=>image,width=>32,height=>32,file=>tzbm
      
      But the icon doesn't appear in the "Domains" menu.
    2. Install the plugin for X3 theme using "usr/local/cpanel/scripts/install_plugin tzbm_plugin_install.tar.gz --theme x3"
      What create a second dynamicui file "/usr/local/cpanel/base/frontend/x3/dynamicui/dynamicui_business_mail.conf" containing :
      Code:
      width=>,itemorder=>1,file=>business_mail,description=>Business Mail,itemdesc=>Business Mail,height=>,group=>files,subtype=>img,imgtype=>icon,url=>tzbm/index.live.php,type=>image
      But again, no icon in the "Files" group.

    When we install the plugin for "Paper Lantern" using "usr/local/cpanel/scripts/install_plugin tzbm_plugin_install.tar.gz", the icon is displayed in the right place and the plugin interface is accessible.

    With old version of cPanel (11.38 for sure), before the apparition of "Paper Lantern" theme, everything worked well.

    Is there something that we missed ?

    Thanks a lot for any tips that could help us solve this problem.
     
  2. BMS

    BMS Registered

    Joined:
    Aug 14, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Are you getting a 404 when accessing that plugin from the client view? If so, did you copy over the plugin files from the old theme to the new? For example:

    cp /usr/local/cpanel/base/frontend/x3/PLUGIN-NAME /usr/local/cpanel/base/frontend/paper_lanter/PLUGIN-NAME
     
  3. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hi BMS,

    Thanks for your answer, but the problem is not that the plugin is not accessible, the problem is that with X3 theme we cannot succeed on displaying the icon in the menu.

    The plugin code is present in /usr/local/cpanel/base/frontend/x3 as well as in /usr/local/cpanel/base/frontend/paper_lantern. And the plugin is accessible throught the displayed icon with Paper Lantern theme.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hi cPanelMichael,

    Sorry I forgot to say that we also tried the *rebuild_sprites* command but without success.

    But... Today, the icons magically appeared in both *Domains* and *Files* menus as installed yesterday.

    I guess there is a cache or something like that as yesterday we didn't succeeded on displaying them.
    I just try to remove and add the plugin again to verify that the behaviour is ok now.... No luck.

    Running *register_cpanelplugin*, *install_plugin*, *rebuild_sprites* doesn't make the icon appear, whereas the files are present in the *dynamicui* directory of each theme and the icons are in the sprites. But it will appear in a few hours... Maybe.

    Is there a cache ? Or maybe it's related to our server.

    I'll just give a feedback when the files appear again.

    Thanks for your answers
     
    #5 tizoo, Aug 15, 2014
    Last edited: Aug 15, 2014
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hi cPanelMichael,

    Yes, I tried to logout/login, to clear browser cache, from another browser, from another system, through a ssh tunnel, after having stop/start cpanel daemon.

    I will just try to restart my system and then restart the server.....

    /usr/local/cpanel/bin/register_cpanelplugin tzbm.cpanelplugin => Nothing
    /usr/local/cpanel/scripts/install_plugin tzbm_plugin_install.tgz => Nothing
    /usr/local/cpanel/scripts/install_plugin tzbm_plugin_install.tgz --theme x3 => Nothing
    Reboot of the system => Nothing
    Access from another system => Nothing
    Reboot the server => Nothing

    Whatever I try, nothing works but sometimes, suddenly, one icon appear in x3 or Paper Lantern.

    That's so weird, I will wait for tomorrow to see if the icons appear.

    If I find the problem, I will post the reason.
     
    #7 tizoo, Aug 15, 2014
    Last edited: Aug 15, 2014
  8. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hi all,

    As we always have the same problem, I try to understand the reason. And... No luck.

    But here is what we have and what we do.

    We register our plugin with 2 registrations commands:
    Code:
    # [1] Install TZBM cPanel plugin for Paper Lantern theme
    /usr/local/cpanel/scripts/install_plugin tzbm_plugin_install.tgz
    
    # [2] Register TZBM cPanel plugin for old themes
    /usr/local/cpanel/bin/register_cpanelplugin /usr/local/cpanel/bin/tzbm.cpanelplugin
    For some unknown reason we have to run the installation for Paper Lantern first as otherwise it will trash the installation for old themes in the way, for example, that the icon don't appear in the defined place.

    On thing that we have noted is that when installing for Paper Lantern, the dynamicui files /usr/local/cpanel/base/frontend/*/dynamicui/dynamicui_business_mail.conf created by the install_plugin script are set to permissions 600. And then however that the icon is inserted in the sprites, it is now shown in the panel.

    We tried many combinations of register/unregister/rebuild_sprite/chmod but none could tell us what is for sure the problem. And none could magically make the icons appear in the panel. But suddently, they appear.

    What is strange it that everything seems ok, the dynamicui files are present, they are 644, the icon is present in both sprites, but the icons aren't displayed. We thought about something like a cache or cPanel internal configuration that are not always updated.

    Maybe the register-unregister-register process is a problem and a cache in the feature manager is the source of the problem.

    Then if you have some problem with icon display, have a look in the permissions of dynamicui files and do some of these commands more than one time and in any order:

    /usr/local/cpanel/bin/register_cpanelplugin [plugin_file_for_X3]
    /usr/local/cpanel/bin/unregister_cpanelplugin [plugin_file_for_X3]
    /usr/local/cpanel/scripts/install_plugin [plugin_archive_for_PL]
    /usr/local/cpanel/bin/rebuild_sprites
    /usr/local/cpanel/bin/sprite_generator

    Or just wait tomorrow... The icon will maybe magically appear.

    If someone have a better solution, we will gladly test it.

    Here are the file we use:

    Plugin file for X3:
    Code:
    version: 1.0
    name:business_mail
    description:Business email
    featuremanager:1
    url:tzbm/index.live.php
    acontent:
    onclick:
    if:
    itemorder:2
    itemdesc:Business Mail
    group:mail
    image:/9j/4A...
    Plugin archive for PL:

    tzbm_plugin_install/
    ├── install.json
    └── tzbm.png
    Code:
    cat install.json
    [
       {
         "icon" : "tzbm.png",
         "group_id" : "email",
         "order" : 2,
         "name" : "Business Mail",
         "type" : "link",
         "id" : "business_mail",
         "uri" : "tzbm/index.live.php"
       }
    ]

    Thanks for reading and for any tips.

    Cheers,
    Philippe
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can review your installation process and attempt to reproduce the issue on your system? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  10. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hi cPanelMichael,

    The ticket has just been created : 6587637

    Thank you,
    Philippe
     
  11. tizoo

    tizoo Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Hi all,

    Thanks to the cPanel support team, the problem we encounter was now solved. It was due to the permissions of the *dynamicui* directories that had bad permissions. The bad permissions have certainly set at one time or another by our install script.

    Finally, if you encounter the same *icon not displayed* problem, think about also checking the following :

    The permissions of the dynamicui directories (should be 755) :

    # ls -ld /usr/local/cpanel/base/frontend/*/dynamicui

    The permissions of your dynamicui files insides the said directories (should be 644) :

    # ls -ld /usr/local/cpanel/base/frontend/*/dynamicui/[name_of_your_plugin]

    Hope this could help someone.

    Thanks to cPanel support team and everybody else,

    Philippe
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page