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 file mishaps [URGENT]

July 03, 2012 9:29am

Subscribe [2]
  • #1 / Jul 03, 2012 9:29am

    Digitaal Dier

    75 posts

    Hey guys,

    I’m using Safecracker file for an e-Learning environment, so kids can upload homework. Somehow, the files get associated with the wrong entries. So Student A’s homework file (homework is a channel) gets assigned to Student B’s homework entry… this is a VERY SERIOUS issue (they can’t check student’s homework if it’s misassigned), and can absolutely not wait until after 4th of july weekend. I can provide you with login info and examples if you like.

    Thanks,

    - Steven

  • #2 / Jul 04, 2012 11:25am

    Dan Decker

    7338 posts

    Hi Steven,

    ...and can absolutely not wait until after 4th of july weekend.

    I can appreciate your urgency on this. We are not all off, just reduced staff.

    Anytime you have an issue like this, we can be one step ahead of the game if you provide as much detail as possible. That would include ExpressionEngine version information and template code, especially when dealing with SafeCracker.

    There are several options available in SafeCracker that can assure that only the “author”, in your case, the students, are allowed to edit an entry. It sounds very much like that could be the case, but without your template code, I can’t know.

    I look forward to your reply!

    Cheers,

     

  • #3 / Jul 05, 2012 2:40am

    Digitaal Dier

    75 posts

    Sry ‘bout that, I’m running EE 2.4.0 Build: date 20120123. My Safecracker code looks like this:

    {exp:safecracker
     channel='homework'
     include_jquery='no'
     return='lessen-maken/ingeleverd'
     id='homework'
     dynamic='no'
    }
     <input type="hidden" name="title" value="{visitor:global:member_firstname} {visitor:global:member_lastname} - {segment_4} - {segment_3}">
     <input type="hidden" name="homework_course[selections][]" value="{segment_3}">
     <input type="hidden" name="homework_period[selections][]" value="{segment_4}">
     <input type="hidden" name="status" value="Na te kijken">
     <div class="info">
      {exp:low_variables:parse var="homework_popup_inleveren"}
     </div>
     <span class="upload-wrapper">{field:homework_file}</span>
     <button type="submit" class="button-submit">Inleveren</button>
    {/exp:safecracker}

    The 2nd and 3rd hidden input set a Playa-field. As you can see I’m using Zoo Visitor to also set a title for each new homework-entry. For the entries that have mismatched homework the Author set for the entry matches the first- and lastname in the title, but when I open the file I can see the actual name of the student that made the homework in there (they’re required to add it to the first page of their homework) and it’s an entirely different student. I’ve tried uploading homework myself and this didn’t happen (it’s only 3 entries of about 40-50 total that show this behaviour), and I’m really stumped as to what might cause this… perhaps if an entry is created at roughly the same time as another it sort of misfires?

  • #4 / Jul 05, 2012 3:33am

    Digitaal Dier

    75 posts

    Also really weird is that most of the time files get temp_file_ prepended to their filename (so you end up with “temp_file_Homework_x_by_y.pptx”... Any thoughts on why that would happen?

  • #5 / Jul 06, 2012 10:17am

    Shane Eckert

    7174 posts

    Hello Digitaal Dier,

    Thank you for providing more information.

    I do not see anything in the safecracker form that you provided that stands out. With Playa and Zoo Visitor in the picture it could be any number of things. I saw this post before I left my shift yesterday and was thinking about it off and on until now. I cannot think of anything in ExpressionEngine that would account for this.

    To test can you try just a basic form in it’s own template and submit several times with different authors to see if that creates a wrongly assigned example? I would like the Third Party Add-Ons ruled out. I have a feeling there is something that needs to be tweaked with this customized set up.

    You can also double post if you want and ask the same question in the Community Help Forum. Someone in the community may have run into this. And it would not hurt to let the Zoo Visitor devs know what you are trying to do, they may have a better idea about it. Just some information and consideration for you.

    Please let me know what your test results yield.

    Cheers,

  • #6 / Jul 19, 2012 10:47pm

    Ryan M.

    1511 posts

    I just posted about this issue in another thread, where “temp_file_ is getting added to the filename. This happened to be a new development for us - this was not happening before. Details in the other thread, but wondering if there is a resolution to be found in these forums somewhere?

  • #7 / Jul 20, 2012 4:59pm

    Shane Eckert

    7174 posts

    Hey mdesign,

    Gotcha covered in this thread.

    Thanks,

  • #8 / Aug 17, 2012 10:36am

    Digitaal Dier

    75 posts

    Hey guys,

    This hasn’t been resolved yet, and both me and my client are running out of options. I’ve built an application for them and it can’t even meet it’s most basic requirements. Can you please please login and see if you can find anything? I’m lost here.

    Thanks,

    - Steven

  • #9 / Aug 17, 2012 4:47pm

    Dan Decker

    7338 posts

    Hey Steven,

    Sure thing. Be on the lookout for an email from EllisLab.

    ~

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

ExpressionEngine News!

#eecms, #events, #releases