File uploading, but field data not setting
Posted: 02 September 2010 08:58 PM   [ Ignore ]
Wallflower
Rank
Total Posts:  10
Joined  2010-04-09

I implemented SafeCracker File fields on a site running 2.1 build 20100805. Using the control panel, I upload the file and save the entry. The file uploads—I see it in the upload folder—but when I get back to the entry, it’s still the “browse” button. Looking at the database, the field contents are blank.

What can I do to help diagnose the issue?

Profile
 
 
Posted: 02 September 2010 09:05 PM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Can you add this after line 109 in ft.safecracker_file.php?

print_r($data); 

And tell us what that prints out?

Profile
 
 
Posted: 02 September 2010 09:12 PM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-04-09
Array
(
    
[name] => Screen_shot_2010-09-02_at_12.08_.52_PM_.jpg
    [is_image] 
=> 1
    [dimensions] 
=> width="471" height="261"
    
[directory] => 3
    [width] 
=> 471
    [height] 
=> 261
    [thumb] 
=> /images/content/classifieds/_thumbs/thumb_Screen_shot_2010-09-02_at_12.08_.52_PM_.jpg
    [url_path] 
=> LGAVhIkys4RHqClQWrFmG3QLxe4Ab8wmoA6yY4kK+d/xY+dV+fvLumtvE4xazcb5iFzmCNR8oPRPaUZv0jHdZGhAI+RYwv5wpInLcRyi8PIFRYo2vHFkOeiX4OoaEAf0w281aReOyB0WurNo8GxTXAoqdD82/Hz/kOHbFZr7e6TCsqpvcAR0XCB5pQO9SL+e08Nb7ankboIzLc0sUXHPcZ4i89WgtV2HSSq+u1ZpkvJVCfbnvKv40A2b3Yew7BHjoK0lWC3zOK8pWmpstIk4cI99EH6cN1OOe634OkIKaKfBVjDzNVWz7w8h/ehwCYmWeT/3LNUpo/WymI4sQuJU6Q==

By the way, I had tried it with an absolute path/URL as well but it didn’t help.

Profile
 
 
Posted: 02 September 2010 09:20 PM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

If you can give me cp/ftp access, I could debug this more quickly. I understand if that’s not possible. We’ll proceed with more print_r’s if not.

Profile
 
 
Posted: 02 September 2010 09:49 PM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  10
Joined  2010-04-09

For the record, this was fixed by Rob via email/IM.

Profile
 
 
Posted: 02 September 2010 09:52 PM   [ Ignore ]   [ # 5 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

I’ll have a new build soon. There was a bug regarding multiple file fields in a channel.

Profile