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.

File fileds getting corrupted on autosave or required field error

August 18, 2010 3:34pm

Subscribe [3]
  • #1 / Aug 18, 2010 3:34pm

    tpayton

    172 posts

    Working on our first 2.1 site and adding quite a bit of content and we have found that pictures were being erased somewhat randomly. In troubleshooting this we found that if there is a required field on the publish form and it is NOT completed and then on update generates an error, any “File” fields become corrupted. It is not really corrupted, I think it just forgets where it points to. The tell all sign of this is that the icon in the publish form becomes generic rather that the image.

    BTW, the same thing happens if you get “auto save” data from an entry.

    I’ve attached some screen shots of what happens before the error and after the error.

    Any thoughts?

    v2.1.0
    Build:  20100810

  • #2 / Aug 19, 2010 3:23am

    John Henry Donovan

    12339 posts

    tpayton,

    I have replicated your set-up and not your issue.
    I tied various things like saving layouts, different required fields etc.

    In your File Upload Preferences under URL of Upload Directory do you have a relative or absolute URL?
    Does this happen for a publish form without the Better Meta installed?

    I realize you said it was your first site but is this a fresh install of build 20100810 or an upgrade?

  • #3 / Aug 19, 2010 4:02am

    tpayton

    172 posts

    John - Great catch! Indeed I uninstalled Better Meta and the problem went away. Then in reinstalled it and still no problem.

    Humm. Maybe you just intimated my EE install into submission. I’ll let you know if the problem comes back.

    Thanks!

  • #4 / Aug 19, 2010 1:34pm

    tpayton

    172 posts

    It’s Back!  I disabled every add on, extension, etc and the problem is no longer happening on a required field, but IS happening when loading an autosave.

    In fact look at the code from the CP page:

    This is just editing the entry normally WITHOUT autosave:

    <input type="hidden" name="field_id_68_hidden" value="CUP0006201_Veer.JPG" />
    </div><div class="no_file js_hide"><input type="file" name="field_id_68" value="CUP0006201_Veer.JPG"  /></p><select name="field_id_68_directory">
    <option value="1">General Uploads</option>
    <option value="2" selected="selected">Header Images</option>
    <option value="6">Help Files</option>
    <option value="3">Home Gallery Images</option>
    <option value="7">Library Downloads</option>

    This is editing the same entry USING autosave data (also see the attached screen shot)

    <input type="hidden" name="field_id_68_hidden" value="CUP0006201_Veer.JPG" />
    </div><div class="no_file js_hide"><input type="file" name="field_id_68" value="CUP0006201_Veer.JPG"  /></p><select name="field_id_68_directory">
    <option value="1">General Uploads</option>
    <option value="2">Header Images</option>
    <option value="6">Help Files</option>
    <option value="3">Home Gallery Images</option>
    <option value="7">Library Downloads</option>

    Also this is a brand new EE install. Just did it last Friday.

  • #5 / Aug 19, 2010 1:36pm

    tpayton

    172 posts

    The client is starting to add content to this site today, is there anyway to disable autosave?

  • #6 / Aug 20, 2010 2:12am

    John Henry Donovan

    12339 posts

    tpayton,

    I am reporting this as a bug here.
    https://support.ellislab.com/bugs/detail/13667/

    There doesn’t seem to be an issue with the image as such now. Does there? It just shows the required field message but it allows you to save it. Is that the same for you?

    is there anyway to disable autosave?

    in your system/expressionengine/config/config.php add this line

    $config['autosave_interval_seconds']    = "0";
  • #7 / Aug 20, 2010 1:34pm

    tpayton

    172 posts

    John - thanks for your help. Disabling autosave seems to eliminate the problem. It looks like autosave bug in EE is the problem that shows up matrix and playa and I actually found a bug report by Brandon @ Pixel & Tonic. It is marked resolved, but apparently it is still a problem in my build:

    https://support.ellislab.com/bugs/detail/12509/

    So a feature request is to have autosave prefs in Channel > Global Preferences.

    - T.

  • #8 / Aug 20, 2010 4:58pm

    Sue Crocker

    26054 posts

    Make sure you post that in the Feature Requests forum if you haven’t already.

    Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases