ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

File module {size} var in EE 2.2

June 22, 2011 7:26pm

Subscribe [3]
  • #1 / Jun 22, 2011 7:26pm

    garrettwinder

    70 posts

    Howdy,

    I’m testing out the new file module in my default sandbox environment and I’m not getting any results with the {size} variable mentioned here.

    Here’s the code:

    <ul>
        {exp:file:entries
            directory_id="1"
            disable="categories|pagination"
            limit="5"
        }
        <li><a href="http://{file_url}">{title} - {size}</a></li>
        {/exp:file:entries}
    </ul>

    Any ideas? Thanks!

  • #2 / Jun 23, 2011 11:44am

    Kyle Cotter

    730 posts

    Hey Garrett,

    Unfortunately, I can’t reproduce your issue, are you running a fresh install, or an upgrade?

    What kind of files are you uploading, and how big are these files?

    Do you have any other code in the template that could be interfering here?

    We also released a hotfix last night that could have addressed the issue, if you can download ExpressionEngine again and replace “system/expressionengine/library/functions.php”, this might help.

    Thanks Garrett!

  • #3 / Jun 23, 2011 11:49am

    garrettwinder

    70 posts

    It’s on a fresh install just to run some tests.

    Was a 640x480 jpg (229kb). No other code on the page. I’ll download the hotfix, look into it a bit more and get back to y’all.

    Thanks Kyle!

  • #4 / Jun 24, 2011 11:38am

    Sue Crocker

    26054 posts

    Hi, Garret. Have you had a chance to redo the install with the newer files?

  • #5 / Jun 24, 2011 11:57am

    garrettwinder

    70 posts

    Hey Sue - I have updated the installation and am still not seeing any output for the {size} var. I’ve completely emptied the template to only include the code I posted above.

    I am on a local MAMP installation with default settings, if that helps. Thanks!

  • #6 / Jun 27, 2011 6:47pm

    Sue Crocker

    26054 posts

    So am I - and it works for me just fine…. hmmm.. Was this a brand new install, or an update from 2.1.x?

  • #7 / Jun 28, 2011 7:33pm

    garrettwinder

    70 posts

    It’s a brand new install. I’ve tried just about everything and still cannot get this variable to output anything. I’ve used the {file_size} variable and that does work, but it’s not quite as nice as what the {size} var is supposed to output.

    Since this is working for everyone else I’ll just assume it’s some sort of local MAMP issue, thanks.

  • #8 / Jun 28, 2011 9:01pm

    Lisa Wess

    20502 posts

    Hi, Garrett -

    Are you willing to work with us a bit longer to try to figure this out?

    My next question, if so, is if that code in your original post is the *only* code in your template?  I’d like to make sure we’re testing on a fully reduced template to avoid any conflicts with other template tags.

    Also, can you let us know what your Debug preference is set to in Output and Debugging?  Does changing that impact the output of the {size} variable?

    Thanks!

  • #9 / Jun 28, 2011 9:53pm

    garrettwinder

    70 posts

    Hey Lisa, I’d love to.

    I’ve moved the original code from my first post to its own template. I’ve just turned template debugging on, though the output of {size} is still empty.

  • #10 / Jun 28, 2011 10:12pm

    Lisa Wess

    20502 posts

    Hi, Garrett -

    My fault, I meant the Debug Preference - which should be 1 or 2.  Can you try playing with that and seeing if it changes? We had some reports in 2.2 that setting it to 1 was stopping some variables - such as {elapsed_time} from working, and I’m curious if that’s at play here, as well.

  • #11 / Jun 28, 2011 10:35pm

    garrettwinder

    70 posts

    Sorry about that - I’ve switched between 1 & 2 a few times and I’m still not seeing any changes.

  • #12 / Jun 29, 2011 5:30pm

    garrettwinder

    70 posts

    Alright - I’ve fixed it but, unfortunately, still have no answers. Here’s a recap though:

    I originally had the issue when I did a clean install of ExpressionEngine 2.2 locally (pre hotfix). I updated the hotfix files and still had the issue. Today I did a complete re-install (saved my template files and rebuilt my channels) and it worked.

    Thanks for the help!

  • #13 / Jun 29, 2011 6:31pm

    Sue Crocker

    26054 posts

    Hi, Garrett. Glad that fixed it.

    I’ll use your code as a basis for a regression test going forward.

    If anything else comes up, please do let us know in a new thread..

  • #14 / Jun 29, 2011 6:32pm

    Sue Crocker

    26054 posts

    Now really closing.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases