Search

I'm getting some weird XML back from a datasource, and it's throwing a lot of errors. If you look at the "type" attribute in entry/file you will see what I am referring to, the forward slash and the quotes closing early.

How can I fix this? I need support asap, as the site is already live.

<entry id="31">
        <title handle="romans-1-24-32">Romans 1:24-32</title>
        <date time="10:30" weekday="7">2011-04-24</date>
        <file size="3.10 MB" path="/sermons" type=""application/octet-stream"">
            <filename>romans-1.24-32-april-24-2011.mp3</filename>
            <meta creation="2011-04-28T12:37:54-04:00" />
        </file>
        <speaker>
            <item handle="nathan-raynor">Nathan Raynor</item>
        </speaker>
    </entry>

It looks like the value of the file type attribute is getting double wrapped in double quotes. What version of Symphony are you using?

If you are using the latest release and the field is a default upload field, I believe the code that adds the type attribute is in /symphony/lib/toolkit/fields/field.upload.php.

I'm using Symphony 2.1.2. I'd prefer not to upgrade, unless it would be a seamless transition. Do you know if there is any solution for 2.1 specifically?

UPDATE: I commented out that line and it works fine! The type attributes aren't entirely necessary, correct?

I don't see this problem with the type attribute on my websites. Can you tell me when you downloaded 2.1.2?

I commented out that line and it works fine! The type attributes aren't entirely necessary, correct?

If you're not using that attribute, then you shouldn't need to worry. BUT, this will affect every data source where this field type is used.

More importantly, I'd like to know why that's happening.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details