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.

img formatting button not working in safecracker

September 19, 2012 5:25pm

Subscribe [1]
  • #1 / Sep 19, 2012 5:25pm

    interactive @dvl

    144 posts

    Hey,

    I have a SAEF form and can see the img button but it doesn’t do anything when I click on it.

    I’m using v2.4.0 - Build: date 20120123.

    I have done the following:

    - the button is enabled in my member account/profile page (it was deleted and added back if that makes a difference)
    - the code for that button says

    [![Link:!:http://]!]

    - the custom field has “show file chooser” set to yes (“show writemode” is set to No)
    - the button works fine in the Publish page in the control panel
    - my safecracker tag looks like this

    {exp:safecracker class="entryForm" channel="content" return="something/index/ENTRY_ID" entry_id="{segment_2}" include_jquery="no"}

    any thoughts on what else I might’ve missed?

     

  • #2 / Sep 20, 2012 11:03am

    interactive @dvl

    144 posts

    I just changed the name of the formatting button to “image” and it works - at least in the sense that it opens up and asks for a Link and Alternative text. But how can I make it open the file manager?

  • #3 / Sep 20, 2012 11:30am

    interactive @dvl

    144 posts

    Just checked in another installation of EE that I have (v2.4.0 - Build: date 20120123 ) and the img button isn’t doing anything there either.

    Can anyone tell me if they have an image button that works with a textarea in Safecracker (works=pulls up the file manager and then inserts the image info back into the textarea)?

    thanks

  • #4 / Sep 21, 2012 1:49pm

    interactive @dvl

    144 posts

    Hey - am I just missing something really stupid here? Can anyone help me out?

  • #5 / Sep 21, 2012 5:00pm

    Kevin Smith

    4784 posts

    Hi dvl,

    Could you share here the full SafeCracker tag you’re using in your template? I suspect something’s missing, but it’s hard to tell without looking at it. Post it here, and I’ll hop right back to see what’s going on with it.

  • #6 / Sep 25, 2012 10:35am

    interactive @dvl

    144 posts

    Hey Kevin, thanks for taking a look. Here’s the whole form:

    {exp:safecracker class="entryForm" channel="content" return="forms/index/ENTRY_ID" entry_id="{segment_2}" include_jquery="no"}
    
     <label for="title">Title</label>
     <input class="saef" type="text" name="title" id="title" value="{title}" size="100" maxlength="100">
     
     <label for="url_title">URL Title</label>
     <input  class="saef" type="text" name="url_title" id="url_title" value="{url_title}" maxlength="100" size="100">
     
     {status_menu}
      <label for="status">Status</label>
      <select name="status" id="status">
       {select_options}
       </select>
     {/status_menu}
     
     <label for="entry_date">Date</label>
     <input class="saef" type="text" name="entry_date" id="entry_date" value="{entry_date}" maxlength="23" size="25">
     
     <label for="expiration_date">Expiration Date</label>
     <input class="saef" type="text" name="expiration_date" id="expiration_date" value="{expiration_date}" maxlength="23" size="25">
     
     {category_menu}
      <label for="categories">Categories</label>
      <select class="saef" name="category[]" id="categories" size="14" multiple="multiple">
       {select_options}
      </select>
     {/category_menu}
     
     {custom_fields}
     
      <label for="{field_name}">{if required}* {/if}{field_label}</label>
      
      {formatting_buttons}
      <div class="instructions">{field_instructions}</div>
      
      {if textarea}
       <textarea id="{field_name}" name="{field_name}" dir="{text_direction}" cols="50" rows="{rows}">{field_data}</textarea>
      {/if}
      
      {if textinput}
       <input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="100" />
      {/if}
      
      {if pulldown}
       <select id="{field_name}" name="{field_name}">
        {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
       </select>
      {/if}
      
      {if date}
       <input type="text" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" />
      {/if}
      
      {if relationship}
       <select id="{field_name}" name="{field_name}">
        {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
       </select>
      {/if}
      
      {if multiselect}
       <select id="{field_name}" name="{field_name}[]" multiple="multiple">
        {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
       </select>
      {/if}
      
      {if checkbox}
       {options}{option_value} <input type="checkbox" id="{field_name}" name="{field_name}[]" value="{option_value}"{checked} />{/options}
      {/if}
      
      {if radio}
       {options}{option_value} <input type="radio" id="{field_name}" name="{field_name}" value="{option_value}"{checked} />{/options}
      {/if}
      
      {if file}
      {/if}
      
      {if safecracker_file}
       {display_field}
      {/if}
      
      {if videoplayer}
       {display_field}
      {/if}
     
     {/custom_fields}
     
     {if captcha}
      <label for="captcha">Please enter the word you see in the image below:</label>
      {captcha}
      <input type="text" name="captcha" value="{captcha_word}" maxlength="20">
     {/if}
     
     <input class="saefSubmit" type="submit" name="submit" value="Submit">
    
    {/exp:safecracker}

    I just double checked and jquery is being brought in in the <head> tag at the top of the page.

     

  • #7 / Sep 26, 2012 2:16pm

    Kevin Smith

    4784 posts

    Thanks for the template code. I checked on my system, and it looks like this is indeed a bug even in the most recent version. I see you’ve commented on that bug, so you’re already tracking its progress. I’ll make sure to flag the engineers on this one since it’s so long in the tooth, and we’ll see what’s going on here.

  • #8 / Sep 27, 2012 12:24pm

    interactive @dvl

    144 posts

    Thanks for taking a look, Kevin! I’ll be on the lookout for an update on the bug page.

  • #9 / Sep 27, 2012 5:37pm

    Kevin Smith

    4784 posts

    Sounds good, dvl. I’ll go ahead and close this one up since you’re now following it on the bug report.

    Have a good one!

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

ExpressionEngine News!

#eecms, #events, #releases