Custom cpanel plugin icon not displayed in x3 theme

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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.
 

BMS

Registered
Aug 14, 2014
2
0
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
 

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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.
 

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
Hello :)

Have you tried logging out, clearing your browser cache, and logging back in to see if the issue continues?

Thank you.
 

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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.
 
Last edited:

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
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.
 

tizoo

Well-Known Member
Jan 6, 2004
77
3
158
cPanel Access Level
DataCenter Provider
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.