Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
  #1 (permalink)  
Old 04-15-2008, 08:22 AM
sadams@bigrocksports.com sadams@bigrocksports.com is offline
Member
 
Join Date: Jan 2008
Posts: 25
sadams@bigrocksports.com is on a distinguished road
Default [SOLVED] Custom zimlet XML parsing error

A former employee implemented a custom zimlet called part_zimlet.zip. It worked until we went to Zimbra 5.0.x.

The purpose of the zimlet is so that if I user highlights a part number such as xxxx-xxxx, a popup displays with details of the item. The details are obtained by querying our host server.

What happens now if is a user highlights a part such as 0001-0001, the following popup displays:
XML Parsing Error: XML or text declaration not at start of entity Location: http://webmail.xxxxx.com/service/pro...0.200%2....etc

To ensure the zimlet is installed, I typed: "zmzimletctl listZimlets all". The custom zimlet does show up - "Installed Zimlet files on this host: part_zimlet".

I extracted the contents of part_zimlet.zip and it contains: config.xml, part.xsl, and part_zimlet.xml.

config.xml contains:
<zimletConfig name="part_zimlet" version="1.0">
<global>
<property name="url">http://10.9.110.200/cgi-bin/db.sh/tools/zimlet.w</property>
<property name="allowedDomains">*</property>
</global>
</zimletConfig>

part.xsl contains:
<zimletConfig name="part_zimlet" version="1.0">
<global>
<property name="url">http://10.9.110.200/cgi-bin/db.sh/tools/zimlet.w</property>
<property name="allowedDomains">*</property>
</global>
</zimletConfig>

part_zimlet.xml contains:
<zimlet name="part_zimlet" version="1.0" description="Cust">
<resource>part.xsl</resource>
<contentObject>
<matchOn>
<regex attrs="ig">[0-9][0-9][0-9][0-9][-][0-9][0-9][0-9][0-9]</regex>
</matchOn>
<toolTip>
<actionUrl target="http://10.9.110.200/cgi-bin/db.sh/tools/zimlet.w" xslt="part.xsl">
<param name="module">part</param>
<param name="keydata">${src.objectContent}</param>
</actionUrl>
</toolTip>
</contentObject>
</zimlet>

Any help in determining what is causing this error will be GREATLY appreciated.

Thanks,
Shannon
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 06:27 AM
sadams@bigrocksports.com sadams@bigrocksports.com is offline
Member
 
Join Date: Jan 2008
Posts: 25
sadams@bigrocksports.com is on a distinguished road
Default Re: Custom zimlet XML parsing error

To hopefully increase my chances of receiving a response, I have attached a screen shot of the XML parsing error I am receiving. I would appreciate any help as I cannot figure out why this worked up until recently, although no changes have been made to the Zimlet package.



Thanks,
Shannon
Attached Images
File Type: jpg XMLerror.jpg (18.2 KB, 20 views)
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 08:23 AM
mmorse's Avatar
mmorse mmorse is offline
Zimbra Employee
 
Join Date: May 2006
Location: USA
ZCS Version: NE & OS - in the many flavors of 4.5 & 5.0
Posts: 4,249
mmorse is on a distinguished road
Send a message via AIM to mmorse Send a message via MSN to mmorse Send a message via Yahoo to mmorse Send a message via Skype™ to mmorse
Default

For collective knowledge:

It looks like the web service being used (referenced in the zimlet's manifest file: http:// address/cgi-bin/db.sh/tools/zimlet.w) was returning an XML document with a newline before the XML declaration (i.e. <?xml ... ?>). This is actually not allowed by the XML specification and it causes an error in the browser; so it looks like an edit of the zimlet.w script is in order.

Possible solutions:

1) Modify the zimlet.w script to not insert a newline at the beginning of the output

2) Modify the zimlet.w script to remove the XML declaration at the top of the document. Because it's alright to have whitespace before the root element but it is not alright to have any whitespace at all before the XML declaration.

Shannon could you update us with the path you choose/if that worked for you?
Reply With Quote
  #4 (permalink)  
Old 04-17-2008, 05:38 PM
sadams@bigrocksports.com sadams@bigrocksports.com is offline
Member
 
Join Date: Jan 2008
Posts: 25
sadams@bigrocksports.com is on a distinguished road
Default

I used solution number two and it now works perfectly! That is a HUGE monkey off my back.

It is strange though. The zimlet.w had not been changed in two years. Something must have happened somewhere to make the XML declaration break. Oh well...water under the bridge.

Thanks again,
Shannon
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian Etch 32 / 64: MTA not working xflip Installation 2 01-18-2008 03:58 AM
3.0 to 4.5.3 Upgrade failed (mysql error) dealt Installation 35 03-19-2007 10:30 PM
M3 problem with shares titangears Users 4 01-12-2006 12:01 PM
Zimbra fails after working for 2 weeks Linsys Administrators 9 10-20-2005 01:26 PM
Building native libraries on MacOS X ajmas Developers 3 10-14-2005 11:00 PM


freshmeat.net sourceforge.net The best Java IDE



 

Search Engine Optimization by vBSEO 3.0.0