File Fieldtype not displaying thumb after update to 1.03
Posted: 08 February 2011 12:27 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  17
Joined  2011-02-04

Hi,

I was having the fatal error problem with an File fieldtype, so I upgraded to 103.  Now the error is gone because I can’t get there.  That’s tricksee! :p

(And, btw, the problem I was having with a pt_pill not displaying is fixed now.  Yea!)

Before I updated to 103, the form was displaying the thumbnail, the file field, and the upload button, etc., but after updating all that displays is a link for “Add File” (picture attached).  When I hover over the link, it is displaying the edit template link with a # after it.  In other words, it isn’t linking to an upload page.

Profile
 
 
Posted: 08 February 2011 12:31 AM   [ Ignore ]   [ # 1 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

Can you show us your safecracker template code?

 Signature 
Profile
 
 
Posted: 08 February 2011 12:58 AM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  17
Joined  2011-02-04

About as vanilla as it gets.

It is the last in a custom fields tag pair:

{if file}
        {display_field}
    {
/if} 

 

Here’s the tag:

{exp:safecracker site="trwadmin" channel="back_office" safecracker_head="yes" id="safecracker"
class="safecracker" return="back_office/addpost/ENTRY_ID" preserve_checkboxes="yes" entry_id="{segment_3}”}

Here’s the whole template:

{exp:safecracker site="trwadmin" channel="back_office" safecracker_head="yes" id="safecracker" class="safecracker" return="back_office/addpost/ENTRY_ID" preserve_checkboxes="yes" entry_id="{segment_3}”}

{if segment_3 != ""}
<h2 class=“maintitle”>{title}</h2>
{/if}

 
      <label for=“title”>Title</label>
 
 
      <input type=“text” name=“title” id=“title” value=”{title}” size=“50” maxlength=“100”>
 

 
      <label for=“url_title”>URL Title</label>
 
 
      <input type=“text” name=“url_title” id=“url_title” value=”{url_title}” maxlength=“75” size=“50” />
 

 
      <label for=“entry_date”>Date</label>
 
 
      <input type=“text” name=“entry_date” id=“entry_date” value=”{entry_date}” maxlength=“23” size=“25” />
 

  {status_menu}
 
      <label for=“status”>Status</label>
 
 
      <select name=“status” id=“status”>
      {select_options}
      </select>
  {/status_menu}
 

{custom_fields}

 
  <label for=”{field_name}”>{if required}* {/if}{field_label}</label>
 

  {if textarea}
     
      <textarea id=”{field_name}” name=”{field_name}” dir=”{text_direction}” cols=“50”
rows=”{rows}”>{field_data}  </textarea>
     
  {/if}


  {if pt_pill}
     
      {display_field}
     
  {/if}

  {if radio}
     
      {options}<label class=“checkbox”>{option_value}<label class=“checkbox”>
<input type=“radio” id=”{field_name}” name=”{field_name}” value=”{option_value}”{checked} /></label>{/options}
     
  {/if}
 
  {if text}
     
      <input type=“text” dir=”{text_direction}” id=”{field_name}” name=”{field_name}” value=”{field_data}” maxlength=”{maxlength}” size=“50” />
     
  {/if}
 
  {if select}
     
      <select id=”{field_name}” name=”{field_name}”>
      {options}<option value=”{option_value}”{selected}>{option_name}</option>{/options}
      </select>
     
  {/if}

  {if file}
      {display_field}
  {/if}
 
{/custom_fields}

 
      Submit
 

 
      <input type=“submit” name=“submit” value=“Submit” />
 

{/exp:safecracker}

[ Edited: 08 February 2011 02:21 AM by Connie ]
Profile
 
 
Posted: 08 February 2011 01:45 AM   [ Ignore ]   [ # 3 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

replace:

{if file}
        {display_field}
{
/if} 

with

{if safecracker_file}
     {display_field}
{
/if} 
 Signature 
Profile
 
 
Posted: 08 February 2011 02:19 AM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  17
Joined  2011-02-04

Fixed it.  Thanks.  Didn’t think to try a SafeCracker field type.

Is there a way to display it in the post (with a channel entries tag) so it has the cool thumbnail et al? I can’t find any docs for SafeCracker File.

BTW, SafeCracker is a marvel.  I know you guys are working through bugs like crazy, dealing with spontaneous EE changes that catch you off guard, but I’m willing to be patient (even if I don’t sound like it at times).  I hope you guys make a fortune with this thing, because you SHOULD.

Profile
 
 
Posted: 08 February 2011 06:12 AM   [ Ignore ]   [ # 5 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

My goal with SafeCracker and CartThrob: Go Broke Slowly. I don’t need to make a fortune. Enough to give me time to develop more great stuff is about all I ask.

Regarding the cool thumbnail… I’ll ask Rob our lead developer.

 Signature 
Profile
 
 
Posted: 10 February 2011 11:18 PM   [ Ignore ]   [ # 6 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

Is there a way to display it in the post (with a channel entries tag) so it has the cool thumbnail et al? I canĂ¢??t find any docs for SafeCracker File.

You can only display the fieldtype’s thumbnail view from within exp:safecracker tag. But you can make your own thumbnail with a bit of css and/or the imgsizer plugin.

 Signature 
Profile
 
 
Posted: 23 February 2011 04:49 PM   [ Ignore ]   [ # 7 ]
Wallflower
Rank
Total Posts:  1
Joined  2011-02-23

I didn’t knew that. I hope this information will help me to make my own thumbnail. thanks….....

Profile