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.

Question on file field

February 10, 2012 1:33pm

Subscribe [3]
  • #1 / Feb 10, 2012 1:33pm

    Jason Turcotte

    102 posts

    From what I understand, the file field should output the URL of the uploaded file.

    According to the user guide: “In its most basic form, a File field can be used as a single tag that simply outputs the URL of the file:”

    But when I try to do something like this:

    style="background: url({event_image}) no-repeat;"

    The following is output:

    style="background: url(M10o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr) no-repeat;"

    Thoughts on why it’s not outputting the actual URL?

  • #2 / Feb 11, 2012 9:39pm

    Dan Decker

    7338 posts

    Hi Jason,

    What version of ExpressionEngine are you using? The User Guide always references the most recent release.

    What do you see if you take the tag out of the stlye= element? Is the URL output correctly?

    I look forward to your response!

    Cheers!

  • #3 / Feb 12, 2012 1:34pm

    Jason Turcotte

    102 posts

    Version 2.4

    I’ve tried just using the tag alone (outside the style element) and the same thing is output.

  • #4 / Feb 13, 2012 10:35am

    Jason Turcotte

    102 posts

    A little Monday morning bump.

  • #5 / Feb 13, 2012 10:43am

    Jason Turcotte

    102 posts

    Additonally, if I do something to test, like

    {event_image wrap="link"}

    nothing is output at all.

  • #6 / Feb 13, 2012 4:32pm

    Jason Turcotte

    102 posts

    Dan… you still around?

    Anyone with any thoughts on this?

  • #7 / Feb 13, 2012 6:37pm

    Sean C. Smith

    3818 posts

    Hi Jason,

    Thank you for your patience and my apologies for the delay. I just tested this on my 2.4.0 sandbox with the following code and the background image was output as expected.

    <div>
       some text here
    </div>

    Could you post up more of your template code? I would also like to see what you see in the source on the front end. Could you post up what you see there? Can you also confirm that there is an image that has been uploaded successfully to the entry in question? Can you see that image in the file manager?

    Sean

  • #8 / Feb 16, 2012 8:22am

    Jason Turcotte

    102 posts

    Here’s more of the template code:

    <!--{exp:channel:entries channel="events" limit="1" show_future_entries="yes" category_id="257"}-->
      <!--<div id="boxBack" st yle="background: url( {event_image}) no-repeat;" onc lick="location.href='{title_permalink=events/event_detail}';">-->
        <h2>Special Events</h2>
    <p>   </div><br />
      </div><!--end specialEventsBox--><br />
    <!-- {/exp:channel:entries}-->

    The comment tags and weird spaces are NOT in the actual code, but the forum was taking the EE tags out of the post.


    And the output source:

    <div id="specialEventsBox">
     <!--<div id="boxBack" st yle="background: url(M10o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr) no-repeat;" onc lick="location.href='http://removed';">
      <h2>Special Events</h2>
    <p> </div><br />
    </div><!--end specialEventsBox-->

  • #9 / Feb 17, 2012 2:47pm

    Jason Turcotte

    102 posts

    Shawn, any thoughts?

  • #10 / Feb 19, 2012 2:39pm

    Sean C. Smith

    3818 posts

    Hi Jason,

    Don’t worry about the odd spacing - I completely understand. In the future if that happens you might want to use a pastie.

    If you manually put in the image url into your background tag does it work as expected? Can you see the uploaded image on the server? Have you tried uploading a different image (in the past I had an issue with one image that was corrupted and would never display on the web no matter what I did).

    Sean

  • #11 / Feb 20, 2012 10:00am

    Jason Turcotte

    102 posts

    Hi Jason,

    Don’t worry about the odd spacing - I completely understand. In the future if that happens you might want to use a pastie.

    If you manually put in the image url into your background tag does it work as expected? Can you see the uploaded image on the server? Have you tried uploading a different image (in the past I had an issue with one image that was corrupted and would never display on the web no matter what I did).

    Sean

    Yes, if I hand-code the URL it works fine and I can see it on the server.

  • #12 / Feb 21, 2012 2:28pm

    Jason Turcotte

    102 posts

    It’d be great if we could get this resolved… starting to get some SERIOUS pressure from my client on this as it’s preventing the site from going live.

  • #13 / Feb 22, 2012 2:53pm

    Jason Turcotte

    102 posts

    Bumping, yet again. Anyone?!

    One of the benefits I’ve always promoted to clients about ExpressionEngine is that if there are problems, we get answers in a timely fashion… this thread is now over 10 days old with not much feedback from the support team.

  • #14 / Feb 23, 2012 11:22am

    Jason Turcotte

    102 posts

    Is doing more digging on this, when I searched Google for the string that is being output, I came across this old support forum post:

    http://ellislab.com/forums/viewthread/54903/

    This was of particular interest to me:

    These strings of letters and numbers are inserted by the Template parser as place holders for tags during processing and are not directly relating to the tags or the module/plugin be called by them.  If you want me to take a look and figure out what the problem is, send me Control Panel login information, FTP login for your server, and the exact page where this is occurring.

    Can someone from the support team please chime in on this please?!

  • #15 / Feb 23, 2012 11:37am

    Jason Turcotte

    102 posts

    If I use the file field as a tag pair like so:

    {event_image}
      {url}
    {/event_image}

    Then the following is output in the source:

    M10o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr
         
    {/event_image}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases