All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Can't send variables to Img Sizer

wesbaker 19 Jan 2010 18:56 problem, complete

I tried sending one of the variables I'm using (which is a File Select) to the image sizer plugin and no image showed up. I did a var dump in the image sizer plugin and it was only getting the variable code (e.g {variable}). I tried enabling early parsing on the variable and that didn't help. I also tried adding parse="inward" to the plugin and had no luck.

Replies

  1. Low 19 Jan 2010 19:19

    Hey Wes,

    I've tried this, but I cannot reproduce. Here's some things to check:


    • Check the output of the variable code: is it a full and valid path to your image?

    • Have you modified the upload destination? These changes aren't automatically applied to the Select Files variable types. Check the value and save changes again.

    • Early Parsing should be enabled if you want to use the variable as input for a tag like imgsizer. Make sure you do.

    • Is caching enabled for the said template? Make sure it's cleared.



    If the value of the variable is outputting the correct path and early parsing is enabled, then everything should work.

  2. Low 22 Jan 2010 10:50

    Wes, did you manage to get it working?

  3. wesbaker 22 Jan 2010 20:40

    Low, I checked the output and its an absolute path from the root of the site (e.g. /images/uploads/file.jpg). I modified the upload path a while back, but I noticed that, and reselected the image. I enabled early parsing and there's no caching on the template. When I do a var_dump on the source that gets passed to imgsizer, this is what I get string(24) "{contact_building_photo}".

    If it helps any, I'm doing this locally using EE 1.6.8 (build 20091201) on Mac OS X 10.6.2 and running PHP 5.3.

  4. Low 23 Jan 2010 22:03

    Wes, I'll try to set up a php 5.3 testing environment. In the meantime, can you try to use a different variable as input for a different tag? Say, create a {test_limit} variable with value 1, turn on early parsing for that variable, and use it in combination with a {exp:weblog:entries limit="{test_limit}"} tag. Does that work?

  5. wesbaker 16 Feb 2010 19:52

    Sorry it took me so long to get back to this. I gave it a shot (using Low Variables 1.1.4) using your suggestion of having a test_limit with a value of 1 and using that as a limit. It didn't work—it ended up looping through three times (the number of content items I had in that weblog).

    I put the test_limit variable inside the entries tag pair and it showed up each time as '1'.

  6. Low 16 Feb 2010 20:43

    Right. So, it looks like the early parsed variables aren't parsed early. It must be an environmental issue (feeling like House MD here). Next things to check, before I ask you to send over some var dumps:


    • Do you have any other extensions installed? If so, which ones?

    • Can you install Low Seg2Cat and see if that works correctly? The reason for this is, Seg2Cat uses a similar method to register the global variables. If those variables are not set, something environmental is even more likely.

    wesbaker 17 Feb 2010 15:38

    Turning off LG Addon Updater fixed it.

  7. wesbaker 17 Feb 2010 15:34

    Thanks for your help.

    I have a whole slew of other extensions installed, I started disabling them trying to see if one of them was the culprit and as soon as I turned of LG Addon Updater it started working again. I've had problems before that were caused by LG Addon Updater, so I'll ask Leevi if he knows why.

  8. Low 17 Feb 2010 16:44

    Good, I'll do some investigating myself, too. Leevi mentioned a bug earlier which I thought I fixed, maybe I missed a spot.

  9. Low 22 Feb 2010 22:02

    Wes, to come back to this, the issue seems to be related to this bug. Updating EE (or at least core.extensions.php) to the latest build will solve the issue.

    wesbaker 26 Feb 2010 19:05

    Thanks for looking into this Low, got it all worked out now and I was having issues with other extensions on another project for the same reason.