I'm so puzzled.
I am attempting to make changes to the salesforce zimlet, com_zimbra_sforce
In my tweaking, I want to for this example have the zimlet display a different image. Here are the precise steps I go through which reveal the state of the zimbra system as a log.
Summary:
- I can't figure out why updating my zimlet doesn't update the changes to me. Changing the image in the .css file and remaking the zimlet doesn't propogate the changes to my browser. [even when browser cache is cleared, shift+refresh, etc]
Notes:
- My notes are dispersed throughout
- localhost is an alias for a server machine
- zimbra is the zimbra user we've created for zimbra management tasks
Quote:
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples} /opt/zimbra/bin/zmzimletctl listZimlets
Installed Zimlet files on this host:
com_zimbra_hello
com_zimbra_phone
com_zimbra_url
Installed Zimlets in LDAP:
com_zimbra_hello
com_zimbra_phone
com_zimbra_url
Available Zimlets in COS:
default:
com_zimbra_hello
com_zimbra_phone
com_zimbra_url
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples} mkdir sforce
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples} mkdir sforce/original
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples} cp /opt/zimbra/zimlets-extra/com_zimbra_sforce.zip sforce/original/
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples} cd sforce/original/
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} ls
com_zimbra_sforce.zip
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} unzip com_zimbra_sforce.zip
Archive: com_zimbra_sforce.zip
inflating: Appointment.gif
inflating: Message.gif
inflating: com_zimbra_sforce.xml
inflating: config_template.xml
inflating: sforce.css
inflating: sforce.gif
inflating: sforce.js
inflating: welcome.jsp
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} ls
Appointment.gif com_zimbra_sforce.xml config_template.xml sforce.gif welcome.jsp
Message.gif com_zimbra_sforce.zip sforce.css sforce.js
|
This shows that I'm working with the standard sforce zimlet... without
modifications:
Quote:
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} cat sforce.css
.ImgSFORCE-panelIcon {
background: url("sforce.gif") no-repeat 0 0;
width: 16px;
height: 16px;
overflow: hidden;
}
h3.SForce-sec-label {
font-size: 14px;
margin: 0.5em 0;
border-bottom: 1px solid #777;
}
.SForce-icon-right {
background: url("sforce.gif") no-repeat 100% 50%;
}
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} /opt/zimbra/bin/zmzimletctl deploy com_zimbra_sforce.zip
[] INFO: Deploying on localhost
[] INFO: Deploy successful
|
Once deployed, i point my browser and verify the zimlet is installed.
Quote:
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} rm -rf com_zimbra_sforce.zip
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} grep --color "sforce.gif" *
sforce.css: background: url("sforce.gif") no-repeat 0 0;
sforce.css: background: url("sforce.gif") no-repeat 100% 50%;
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} /opt/zimbra/bin/zmzimletctl listZimlets
Installed Zimlet files on this host:
com_zimbra_hello
com_zimbra_phone
com_zimbra_sforce
com_zimbra_url
Installed Zimlets in LDAP:
com_zimbra_hello
com_zimbra_phone
com_zimbra_sforce
com_zimbra_url
Available Zimlets in COS:
default:
com_zimbra_hello
com_zimbra_phone
com_zimbra_sforce
com_zimbra_url
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} sed -i.BAK 's|sforce.gif|Appointment.gif|g' sforce.
sforce.css sforce.gif sforce.js
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} sed -i.BAK 's|sforce.gif|Appointment.gif|g' sforce.css
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} ls
Appointment.gif com_zimbra_sforce.xml sforce.css sforce.gif welcome.jsp
Message.gif config_template.xml sforce.css.BAK sforce.js
|
This verifies the file has been updated.
Quote:
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} cat sforce.css
.ImgSFORCE-panelIcon {
background: url("Appointment.gif") no-repeat 0 0;
width: 16px;
height: 16px;
overflow: hidden;
}
h3.SForce-sec-label {
font-size: 14px;
margin: 0.5em 0;
border-bottom: 1px solid #777;
}
.SForce-icon-right {
background: url("Appointment.gif") no-repeat 100% 50%;
}
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} rm -rf com_zimbra_sforce.zip
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} zip com_zimbra_sforce.zip *
adding: Appointment.gif (stored 0%)
adding: Message.gif (stored 0%)
adding: com_zimbra_sforce.xml (deflated 58%)
adding: config_template.xml (deflated 44%)
adding: sforce.css (deflated 33%)
adding: sforce.css.BAK (deflated 34%)
adding: sforce.gif (deflated 27%)
adding: sforce.js (deflated 71%)
adding: welcome.jsp (deflated 75%)
|
Take out the old sforce zimlet...
Quote:
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} /opt/zimbra/bin/zmzimletctl undeploy com_zimbra_sforce
[] INFO: Undeploying on localhost
[] INFO: Undeploy successful
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} rm -rf /opt/zimbra/mailboxd/webapps/service/zimlet/
|
Flushed my browser cache, cookies, everything. Even closed the browser after
doing so and then reopened it.
Quote:
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} /opt/zimbra/bin/zmzimletctl deploy com_zimbra_sforce.zip
[] INFO: Deploying on localhost
[] INFO: Deploy successful
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original} /opt/zimbra/bin/zmzimletctl listZimlets
Installed Zimlet files on this host:
com_zimbra_sforce
Installed Zimlets in LDAP:
com_zimbra_hello
com_zimbra_phone
com_zimbra_sforce
com_zimbra_url
Available Zimlets in COS:
default:
com_zimbra_hello
com_zimbra_phone
com_zimbra_sforce
com_zimbra_url
{zimbra@localhost:/opt/zimbra/zimlets-extra/sample-proj/samples/sforce/original}
|
And then I still see the salesforce image in the zimlet, instad of the
calendar image, as you can see:
sforce.jpg
The only way I can get the calendar image replace is if I swap the physical "sforce.gif" and "Appointment.gif" files when I package a zimlet. ie, in the directory where extract the zimlet .zip file:
mv Appointment.gif Appointment.gif.old
mv sforce.gif sforce.gif.old
mv Appointment.gif sforce.gif.old
mv sforce.gif.old Appointment.gif
and then repackage, and then it works.
Argh!
So any ideas?
Is this related?
1. Why does 'deploying' a zimlet only give me:
[] INFO: Deploying on localhost
[] INFO: Deploy successful
and not something which is more detailed like in:
HelloWorldZimlet - Zimbra :: Wiki
ie:
$ /opt/zimbra/bin/zmzimletctl deploy com_zimbra_hello.zip
[] INFO: Deploying Zimlet com_zimbra_hello in LDAP.
[] INFO: Installing Zimlet com_zimbra_hello on this host.
[] INFO: Adding Zimlet com_zimbra_hello to COS default
[] INFO: Enabling Zimlet com_zimbra_hello