Cannot remove an uploaded image.
Posted: 04 November 2010 10:17 PM   [ Ignore ]
Wallflower
Rank
Total Posts:  11
Joined  2010-09-21

Hello,

Successfully uploaded an image in Safecracker with Safecracker File.
When I click on the ‘X’ at the top left of the thumbnail it does not delete it. It just jumps to the top of my page.

When I hover on the X the url is my current page with a hash.

Clues?

John

Profile
 
 
Posted: 04 November 2010 10:19 PM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

I bet you’re getting some javascript error that’s breaking it. Do you have jQuery loaded and safecracker_head set to yes? Can you open your Console/Firebug/Web Inspector and see if there are any JS errors?

Profile
 
 
Posted: 04 November 2010 11:13 PM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  11
Joined  2010-09-21

I do have jQuery loaded in my document head. I take it that safecracker head is supplying it’s own and that I should remove mine from the document head.

Profile
 
 
Posted: 04 November 2010 11:15 PM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Acutally, safecracker_head does not call jQuery, you have do that on your own: http://barrettnewton.com/safecracker/user_guide/entry_form/#section_first_steps

So, any JS errors showing up?

Profile
 
 
Posted: 04 November 2010 11:39 PM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  11
Joined  2010-09-21

Nothing that seems to point at this issue - but then I’m not that adept at debugging JavaScript.

What is odd though is that I cannot delete a safecracjer file image when editing an entry in the control panel.

Profile
 
 
Posted: 04 November 2010 11:41 PM   [ Ignore ]   [ # 5 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Can I take a look? PM some site access if so.

Profile
 
 
Posted: 04 November 2010 11:57 PM   [ Ignore ]   [ # 6 ]
Wallflower
Rank
Total Posts:  11
Joined  2010-09-21

Thanks Rob - PM Sent

Profile
 
 
Posted: 05 November 2010 12:24 AM   [ Ignore ]   [ # 7 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Figured it out. safecracker_head will call up the datepicker javascript, which will cause errors if you haven’t loaded the datepicker plugin. Setting datepicker=“no” did the trick.

Profile
 
 
Posted: 05 November 2010 12:51 AM   [ Ignore ]   [ # 8 ]
Wallflower
Rank
Total Posts:  11
Joined  2010-09-21

Excellent - I’d have never got that one.

Still an issue with the entry in the control panel though. shut eye (Just tried it)

Profile
 
 
Posted: 05 November 2010 12:51 AM   [ Ignore ]   [ # 9 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Weird. It worked when I visited the CP. What browser are you using? Can you try a different one?

Profile
 
 
Posted: 05 November 2010 01:16 AM   [ Ignore ]   [ # 10 ]
Wallflower
Rank
Total Posts:  11
Joined  2010-09-21

Just tried in IE, all fine.
Firefox must be having a senior moment.

Thanks for your help.

John

Profile