Results 1 to 4 of 4

Thread: [SOLVED] Custom zimlet XML parsing error

  1. #1
    Join Date
    Jan 2008
    Posts
    70
    Rep Power
    7

    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

  2. #2
    Join Date
    Jan 2008
    Posts
    70
    Rep Power
    7

    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 Attached Images

  3. #3
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    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?

  4. #4
    Join Date
    Jan 2008
    Posts
    70
    Rep Power
    7

    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

Similar Threads

  1. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 01:42 AM
  2. [SOLVED] Debian Etch 32 / 64: MTA not working
    By xflip in forum Installation
    Replies: 2
    Last Post: 01-18-2008, 04:58 AM
  3. 3.0 to 4.5.3 Upgrade failed (mysql error)
    By dealt in forum Installation
    Replies: 35
    Last Post: 03-19-2007, 11:30 PM
  4. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 01:01 PM
  5. Building native libraries on MacOS X
    By ajmas in forum Developers
    Replies: 3
    Last Post: 10-15-2005, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •