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.

Safecracker field blank in template prior to Febuary - file OK in edit entry form - HELP!

May 22, 2012 2:26pm

Subscribe [1]
  • #1 / May 22, 2012 2:26pm

    dzr_rtw

    86 posts

    So I have page with a list of entry titles and a safecracker file upload field.

    >Everything from Febuary of this year and on is fine.

    >Prior to 2/2012 nothing displays.

    In the admin -

    For posts where the safecracker field is missing - you can see the circle with the x and the file name and if you go to the file name the file is there.

    In the template -

    it’s testing positive for something being there

    {if post_upload1 != ""} 
    
    <em><a href="http://{post_upload1}" target="_blank" rel="noopener">{post_upload1_display}</a></em>
    
    
    {/if}

    {post_upload1} is blank
    {post_upload1_display} is fine


    ARGH!

    we just recently updated EE to ExpressionEngine v2.5.0 - Build Date: 20120507

    UPDATE

    I deleted the safecracker field entry (a PDF file).

    I re-added it and * it does show up on the TEMPLATE now BUT it added “temp_file_” before the name of the PDF file.

    AND I can’t possibly do this for the thousands of entries that have either 1 or 2 safecracker fields w/ uploads in them.

     

     

     

  • #2 / May 23, 2012 1:55pm

    Dan Decker

    7338 posts

    Hi dzr_rtw,

    Thanks for posting to the forums!

    Entries made before Feb. 2012 display as though no file was uploaded with the entry, correct?

    Have you synced your upload destinations recently?

    Have you verified the files still exist on the server?

    What version of ExpressionEngine are you using?

    In the template -

    it’s testing positive for something being there

    This is because SafeCracker File returns the text “NULL” when it contains nothing.

    This test:

    {if post_upload1 != "NULL"}

    Should get you the results you are looking for with that test.

    It would be helpful to see the SafeCracker template for adding new entries as well as the full template for displaying entries.

    Cheers!

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

ExpressionEngine News!

#eecms, #events, #releases