Search

The title has the nut of the issue: for file upload fields, the path attribute always comes out blank in the page XML. The file (images, in this case) is uploaded correctly, and I can see it when I click through the link in the admin interface. The <filename> value is correct in the XML:

    <image size="59 KB" path="" type="image/jpeg">
        <filename>cityhallmain.jpg</filename>
        <meta creation="2011-08-08T19:20:00-04:00" width="296" height="296" />
    </image>

Am I missing a setting somewhere? I don't think I have any conflicting extensions (I do have JIT Image Manipulation, but that acts elsewhere, I believe)

Hmm... do you have a destination folder selected for the field? You would've created this when you created the field in the relevant section.

This was an odd one. I ended up removing/re-adding a couple images after resetting the path field and that got them back to normal.

what may have happened is you initially set the default directory for this field in the section editor page as /workspace, the default. the attribute in the xml output for this field is always relative to /workspace, so without a subdir, "" would have been completely normal.

then maybe you realized that dumping all over your uploads in /workspace is not such a great idea, so you went back and created a subfolder or two then returned to your section editor to change the destination folder to one of these new ones.

unfortunately, the files that had already been uploaded were already saved in the filesystem under /workspace and with an empty path (relative to /workspace) in the database. this would explain why removing and readding the files would give them the proper path attribute in the output xml.

if you need me, watkins, i'll be in my study.

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