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.

SOLVED cPanel Plugin Icon not showing

Discussion in 'cPanel Developers' started by Krydos, Jan 28, 2017.

Tags:
  1. Krydos

    Krydos Active Member

    Joined:
    Jun 2, 2012
    Messages:
    42
    Likes Received:
    4
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Hi, I'm creating a plugin for cPanel and everything is going well so far, except the icon shows up blank.

    I created an install.json file with the contents:
    Code:
    [
      {
        "icon" : "tomcat_48x48.png",
        "group_id" : "software",
        "order" : 998,
        "name" : "Java",
        "type" : "link",
        "id" : "java",
        "uri" : "java/index.live.php",
        "featuremanager" : true,
        "feature" : "java",
        "description" : "Java Tomcat jsp war deploy"
      }
    ]
    
    Then I created an archive java.tar.gz with the contents
    Code:
    # tar zcvf java.tar.gz install.json install.sh tomcat_48x48.png
    
    install.json
    install.sh
    tomcat_48x48.png
    
    Then I installed the plugin as root
    Code:
    # /scripts/install_plugin java.tar.gz --theme paper_lantern
    
    info [install_plugin] Installing to paper_lantern
    info [install_plugin] Running sprite_generator
    Plugin installed ok
    
    Everything works and the link shows up in cPanel like it's supposed to and it links to the new cPanel page I created, but there isn't an icon next to the "Java" link. It's just blank, or white, or nothing. krydos.example.org/images/java.png The first icon I tried used transparency as the background. krydos.example.org/images/tomcat_48x48.png and I also created one with white as the background in case the transparency was causing issues krydos.example.org/images/tomcat2_48x48.png but that one doesn't work either. I also tried creating a jpeg, but then the plugin installer complains that the icon needs to be .png type.

    Any ideas of what to try next?

    EDIT:
    I posted links to the images so people could view/download them and let me know if they were in the wrong format or something. The other image was a screenshot of what I was trying to describe about the icon being blank. A picture is worth a thousand words, right? It really stifles the troubleshooting process when you break my links.
     
    #1 Krydos, Jan 28, 2017
    Last edited: Jan 29, 2017
  2. Krydos

    Krydos Active Member

    Joined:
    Jun 2, 2012
    Messages:
    42
    Likes Received:
    4
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    Ok, nevermind!

    I just gave up messing around with it and let it sit overnight and suddenly the icon is showing up on its own. I wonder if clearing my browser cache may have helped, or maybe the cached sprite image expired and it cleared itself overnight. Either way it works now. When I create my next cPanel plugin I will try clearing the cache and see if it help the icon show up faster. If it does I will try to remember to update this post.
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks for updating the thread.
     
Loading...

Share This Page